git remote add origin git@bitbucket.org:user/repo-name.git
List your existing remotes in order to get the name of the remote you want to change.
$ git remote -v
origin git@bitbucket.org:user/repo-name.git (fetch)
origin git@bitbucket.org:user/repo-name.git (push)
Change your remote's URL
$ git remote set-url origin git@bitbucket.org:user/repo-name.git
Verify that the remote URL has changed with git remote -v
(s. above).
# Switch to the local branch you want to rename
$ git checkout <oldname>
# Rename local branch
$ git branch -m <newname>
# Push the local branch with the new name and reset the upstream branch
$ git push origin -u <newname>
# Delete the remote branch with the old name
$ git push origin --delete <oldname>
Sometimes you want to explicitly declare the remote's branch name. This might be the case when the remote's branch name is different then the local or when working with several remotes.
git push <remote-name> <local-branch-name>:<remote-branch-name>
$ git shortlog -s -n --all --no-merges
$ git tag --delete <tagname>
Push an empty reference to the remote tag name
$ git push origin <tagname>
Or delete the tag explicitly
$ git push --delete origin <tagname>
# Start bisect process
$ git bisect start
# Provide 'good' and 'bad' commit
$ git bisect bad HEAD
$ git bisect good 8341e03b
# Git will check out a commit in the given range.
# Check the app/code and tell Git the result
$ git bisect [good|bad]
# Stop the bisect process when you're done
$ git bisect reset
Create an authors file to map svn users (e.g. 'authors.txt')
user = User Name <user@domain.net>
john = John Doe <john@doe.com>
# Clone the repo
$ git svn clone --no-metadata -A ./authors.txt -t tags -b branches -T trunk file:///Users/username/my-svn-repo