git
努力学习的笨小孩
这个作者很懒,什么都没留下…
展开
-
git pull问题 git config pull.rebase false
You can replace "git config" with "git config --global" to set a default preference for all repositories. You can also pass --rebase, --no-rebase, or --ff-only on the command line to override the configured default per invocation.原创 2021-12-09 23:21:16 · 12663 阅读 · 0 评论 -
git 创建本地分支,并推送到远程分支
git checkout -b feature1 git add . git commit -m "***" git push --set-upstream origin feature1原创 2019-12-09 11:16:48 · 95 阅读 · 0 评论 -
git 撤销commit
写完代码后,我们一般这样 git add . //添加所有文件 git commit -m "本功能全部完成" 执行完commit后,想撤回commit,怎么办? 这样凉拌: git reset --soft HEAD^ 这样就成功的撤销了你的commit 注意,仅仅是撤回commit操作,您写的代码仍然保留。 说一下个人理解: HEAD^的意思是上一个版本,也可以写成HEAD~1 如果你进...原创 2019-12-09 10:49:06 · 104 阅读 · 0 评论