brain/src/dev/tools/git.md
2020-02-11 13:15:17 +01:00

28 lines
439 B
Markdown

# Git
## Fetch a remote branch
- Create a local branch that tracks a remote branch
```shell
git checkout --track origin/develop
```
If you want to change the name of the local branch (_NOT A GOOD IDEA_)
```shell
git checkout --track -b gniagnia origin/develop
```
## Ammend without editing commit message
```shell
git commit --ammend --no-edit
```
## Copy current HEAD sha sum to clipboard
```shell
git rev-parse HEAD | xclip
```