So I'm working with another developer and want to pull and push to a remote branch (that is not the remote master by the way) but I want to set up so that when I check out my local branch on my machine it'll pull from and push to the remote branch without having to specify it explicitly.
I ran this command on my machine (suppose that the remote branch is called development and that the local branch I create is called dev1):
git branch --track dev1 origin/development
Then checked out my local branch dev1, changed a file, staged it, commited it and then tried to push like so:
git push origin
But then I got this message:
Everything up-to-date
Also I noticed extra lines in my .git/config file shortly after I created dev1 and checked it out:
[branch "dev1"]
remote = origin
merge = refs/heads/development
So the question is what am I missing? Basically, I wish to set this up so that I every time I have checked out dev1 and run:
git pull origin
it automatically pulls from origin/development without having to specify this explicitly and when I run:
git push origin
it automatically pushes to origin/development without having to specify this explicitly.
Also, why did it tell me 'Everything up-to-date' when there were clearly changes to push.