Reputation: 2908
I'm new to git and I'm working with another developer. I want whenever I do git pull
or git push
to only affect the development branch. I went to .git/config but I don't understand what is there. Any pointers would be much appreciated.
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = https://github.com/Zeasdfasdf4/m2ex2
[branch "master"]
remote = origin
merge = refs/heads/master
[branch "development"]
remote = origin
Upvotes: 0
Views: 57
Reputation: 19534
You can't switch branches with your gitconfig. How can do this, however, with the git checkout
command.
Simply run git checkout development
to switch to this branch. This also means that pulls and pushes will interact with the remote development branch (instead of the remote master branch).
Upvotes: 1