echo -e "First line.\nSecond line." >> file_name.txt
is a shortcut of two commands.git add .
puts all files into “Index”.master
is a reference to the end of a branch. By convention (and by default) this is usually the main integration branch, but it doesn’t have to be.HEAD
is actually a special type of reference that points to another reference. It may point to master or it may not (it will point to whichever branch is currently checked out).- On your own repository you can check where the
HEAD
is pointing to by runninggit symbolic-ref HEAD
. git reset --hard HEAD^3
deletes your cache and returns to the third parent commit.git checkout -b dev
=git branch dev
+git checkout dec
.git branch
displays current branch.- Suppose you’ve decided that your issue #53 work is complete and ready to be merged into your master branch. In order to do that, you’ll merge your iss53 branch into master. All you have to do is check out the branch you wish to merge into and then run the git merge command:
git checkout master
->git merge iss53
->git branch -d iss53
. git push origin HEAD:refs/for/master
is used for code review.git ls-remote
show all remote branches.
注:本篇博客的内容十分傻逼,我有空一定会写一个更好的版本,不过现在是真的没空啊。 ——JHW奇迹之瞳于1/23/2021