Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make Local branches configured for 'git pull':

Tags:

git

I am trying to create a branch named springdevelopment and push the code it to the git.

git checkout -b springdevelopment 
git add .

git commit -m 'initial commit'
git push origin springdevelopment 
git checkout --track origin/springdevelopment 

when i executed git remote show origin . I am missing "spring development" in local branches git pull section.

Can you please explain what is happened and what is the wrong i have done.

Thanks for your valuable information in advance.

like image 249
Krish Avatar asked Aug 28 '12 06:08

Krish


1 Answers

git checkout -b springdevelopment 
git add .

git commit -m 'initial commit'
git push -u origin springdevelopment 

no need to do this:

git checkout --track origin/springdevelopment 

You can always update tracking later with:

git branch --set-upstream-to origin/springdevelopment

update your refspec to:

[remote "origin"]
    url = [email protected]:user/project.git
    fetch = refs/heads/*:refs/remotes/origin/*
like image 126
Adam Dymitruk Avatar answered Sep 21 '22 07:09

Adam Dymitruk