Git edit



-d, --deleteDelete a branch. The branch must be fully merged in its upstream branch, or in HEAD if no upstream was set with --track or --set-upstream
-DShortcut for --delete --force
-m, --moveMove/rename a branch and the corresponding reflog
-MShortcut for --move --force
-r, --remotesList or delete (if used with -d) the remote-tracking branches
-a, --allList both remote-tracking branches and local branches
–listActivate the list mode. git branch <pattern> would try to create a branch, use git branch --list <pattern> to list matching branches
–set-upstreamIf specified branch does not exist yet or if --force has been given, acts exactly like --track. Otherwise sets up configuration like --track would when creating the branch, except that where branch points to is not changed

Every git repository has one or more branches. A branch is a named reference to the HEAD of a sequence of commits.

A git repo has a current branch (indicated by a \* in the list of branch names printed by the git branch command), Whenever you create a new commit with the git commit command, your new commit becomes the HEAD of the current branch, and the previous HEAD becomes the parent of the new commit.

A new branch will have the same HEAD as the branch from which it was created until something is committed to the new branch.

Feedback about page:

Optional: your email if you want me to get back to you:

  ↑ ↓ to navigate     ↵ to select     Esc to close