Terminology
Branch ¶ A series of commits representing development on one set of functionality in parallel with other sets of functionalities.
git branch -d <branch> ¶ definition: 'Delete a branch.'
ety: ''
variants: ''
git branch -f <branch> <commit> ¶ definition: 'Move (by force) the designated branch to the designated commit.'
ety: ''
variants: ''
git branch -m <oldname> <newname> ¶ definition: 'Rename a branch.'
git branch —merged ¶ List branches that are already merged into current branch.
git branch <name> ¶ definition: 'Create a new branch.'
ety: ''
variants: ''
git branch —no-merged ¶ List branches that have not been merged into current branch.
git branch -r ¶ List only remote branches.
git branch -v ¶ definition: 'List branches with last commit.'
ety: ''
variants: ''
git checkout -b <branch> <remote>/<remotebranch> ¶ Create local branch <branch> as tracking branch of <remote> branch <remotebranch>.
git checkout -b <name> ¶ Create a new local branch and make it the current branch.
git checkout —track <remote>/<remotebranch> ¶ Create local branch <remotebranch> as tracking branch of <remote> branch <remotebranch>.
git push <remote> :<remotebranch> ¶ Delete branch from remote repositiory.
git show <branch>:<filepath> ¶ Show a file as it exists in a particular branch.
Local branch ¶ definition: 'What you see when you type git branch.'
Remote-tracking branch ¶ definition: 'What you see when you type git branch -r; i.e. branches named <remote>/<branch> that your local instance of git is tracking.'
Facts, Thoughts and Opinions
git newbranch
Creates a branch, checks it out, and pushes it to the git server in one command.
!f(){ git branch $1 && git checkout $1 && git push -u origin $1; };f
parse_git_dirty
Rename a remote branch.
git branch -m <oldname> <newname> # Rename the branch in your local repository.
git push <remote> :<oldname> # Remove the branch name you want to change on the remote.
git push <remote> <newname> # Push the new local branch name to the remote.
Images
- Subtopics
- Writings
Sources & Bookmarks
Name/Link | ¶ | Date |
---|---|---|
Fetch and merge, don't pull | ¶ | 2014-06-4 |
Git Branching | ¶ | Worley employment |