$ git tag
Annotated
$ git tag -a v1.4 -m 'my version 1.4'
$ git push origin v1.5
Transfer multiple tags at once
$ git push origin --tags
Source: [http://git-scm.com/book/en/Git-Basics-Tagging]
$ git tag -d release01
$ git push origin :refs/tags/release01
Source: [https://confluence.atlassian.com/pages/viewpage.action?pageId=282175551]
Squash the last 4 commits
$ git rebase -i HEAD~4
The next screen shows the commits that are being squashed. Here you tell it which commits to squash.
The second screen lets you modify the final commit message.
Source: [http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html]
Apparently, there is a --squash
flag for git-merge.
Source: [https://medium.com/code-adventures/a940ee20862d]
$ git pull --rebase
Get rid of the empty merge commit.
Source: [http://notes.envato.com/developers/rebasing-merge-commits-in-git/]
When you commit with a string like “Closes #123" GitHub sees this and will actually close the issue for you, along with referencing the commit in the issue.
The same goes for referencing, just place “#123" in the commit message or body.