From github through HTTPS :
git clone https://github.com/yaap7/wiKBFrom github through SSH:
git clone git@github.com:yaap7/wiKB.gitFrom a custom SSH server:
git clone TODOEnable signing globally:
git config --global tag.gpgsign true
git config --global commit.gpgsign trueAdd signing key per repo if you have multiple keys for multiple identities:
$ gpg --list-secret-keys --keyid-format=long
/Users/hubot/.gnupg/secring.gpg
------------------------------------
sec 4096R/3AA5C34371567BD2 2016-03-10 [expires: 2017-03-10]
uid Hubot <hubot@example.com>
ssb 4096R/4BB6D45482678BE3 2016-03-10
git config user.signingkey 3AA5C34371567BD2See this HowTo.
If my current branch is on heroku/master, and I want to create a new local branch github-deployment which will push/pull from origin/deployment, I can use this command:
git branch github-deployment origin/deploymentTo rename a remote (e.g. to rename origin to github), use git remote rename <old_branch> <new_branch>. Example:
git remote rename origin githubTo delete a remote branch, use git push -d <remote> <branch>. Example:
git push -d github dev_branchAfter the deletion is completed, other developers have to update their remotes using:
git fetch --all --prune(git remote update is not enough!)
To simply type git lgo to launch git log --oneline:
git config --global alias.lgo "log --oneline"Documentation : https://git-scm.com/book/en/v2/Git-Basics-Tagging
Create tag on current commit:
git tag -a v1.0 -m "version 1.0"Push specific tag:
git push origin v1.0If the branch you are working on is tracking a remote branch, e.g. your local branch dev is tracking the remotes/github/dev, you still can push to remotes/heroku/master by using git push <remote> <local_branch>:<remote_branch>. Example:
git push heroku dev:master