- My git flow
- My stashing workflow
- [Feature set] TODO
- Usefull commands (see below)
Command | Description |
---|---|
git fetch --all |
Fetch all remotes |
git branch -a |
List both remote-tracking branches and local branches. |
git branch -r |
List the remote-tracking branches. |
Command | Description |
---|---|
git $branch -m new-name |
Rename local branch, assuming we're in. |
git push origin :$branch new-name |
Delete the old-name remote branch and push the new-name local branch. |
git push origin -u new-name |
Reset the upstream branch for the new-name local branch,assuming we switched to it. |
Command | Description |
---|---|
git rev-parse --abbrev-ref HEAD |
Retrieves current branch name |
git branch --show-current |
Retrieves current branch name |
git symbolic-ref --short HEAD |
Retrieves current branch name |
git rev-list --count --left-right origin/$branch...HEAD |
print the counts for left and right commits, separated by a tab |
git log --pretty='format:%H %s' |
Customized logging: full commit tag and name |
git log --graph --pretty='format:%H %s' |
Same with graph option |
git status -s |
Give the output in the short-format. |
git rev-parse --show-superproject-working-tree |
Retrieve super project from within submodule. |
`` |
Command | Description |
---|---|
git checkout HEAD file |
|
git reset file |
|
git reset --soft HEAD~1 |
|
git commit --amend --no-edit |
--- end of file ---