Difference between HEAD and master

前端 未结 3 908
终归单人心
终归单人心 2020-12-07 07:07

What is the difference between the HEAD and master in Git?

I did a clone of a project on GitHub and want to push my changes to the remote.

3条回答
  •  Happy的楠姐
    2020-12-07 08:10

    The simple answer is that HEAD is a pointer/label to the most recent commit of the branch you are currently on. master is the default branch created when you initialized a git repository (e.g. git init).

    You can delete the master branch (e.g. git branch -D master). You cannot delete the HEAD pointer.

提交回复
热议问题