git本地pull冲突解决办法
git stash
git pull
然后修改冲突的文件
zsh git diff from using a pager
git config --global --replace-all core.pager "less -F -X"
git在创建项目之后忘记添加gitignore办法
git clone
cd dirname
git rm -r --cached <file>
添加.gitignore文件
git add .gitignore
git commit -m "add git ignore"
git push -f origin master
git rm 文件后,没有commit之前恢复的操作
git rm file1
git reset HEAD file1
git checkout file1
Github sync a fork of a repository to keep it up-to-date
https://help.github.com/articles/syncing-a-fork/
https://help.github.com/articles/configuring-a-remote-for-a-fork/
git clone https://github.com/WisWang/website.git
git remote -v
git remote add upstream https://github.com/kubernetes/website.git
git fetch upstream
git merge upstream/master
vim content/en/docs/reference/setup-tools/kubeadm/kubeadm-init.md
git add content/en/docs/reference/setup-tools/kubeadm/kubeadm-init.md
git add *
git commit -m "keep repo update with offcial master"
git push
Resetting remote to a certain commit
git reset --hard
git push -f origin master
是本地分支与远程分支强制一致
git fetch --prune origin
git reset --hard origin/master
git clean -f -d
git 关闭分页,都在当前页显示
git config --global core.pager cat
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 【自荐】一款简洁、开源的在线白板工具 Drawnix