Last active
July 30, 2017 07:06
-
-
Save wojtekk/9171430 to your computer and use it in GitHub Desktop.
GIT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global branch.master.remote origin | |
git config --global branch.master.merge refs/heads/master | |
git config --global branch.develop.remote origin | |
git config --global branch.develop.merge refs/heads/develop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git checkout -t origin/branchName |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f you want to always push all branches, you can set up push refspec. Assuming that the remote is named origin you can either use git config: | |
$ git config --add remote.origin.push '+refs/heads/*:refs/heads/*' | |
$ git config --add remote.origin.push '+refs/tags/*:refs/tags/*' | |
or directly edit .git/config file to have something like the following: | |
[remote "origin"] | |
url = [email protected]:/srv/git/repo.git | |
fetch = +refs/heads/*:refs/remotes/origin/* | |
fetch = +refs/tags/*:refs/tags/* | |
push = +refs/heads/*:refs/heads/* | |
push = +refs/tags/*:refs/tags/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global user.name "YOUR NAME" | |
git config --global user.email "YOUR EMAIL ADDRESS" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment