What would be the proper command to acheive the 2 tasks that i mentioned above. ![]() Git remote -v had the remote -origin pointing to my github repo so that's absence of remote is not the issue. Now i want my local copy to get synced with my github repository such that it exactly mirrors it ( basically that same state if i would have deleted my local copy and recloned it )Ī) it should add new files 11 and 12 from git repoī) it should bring back file 9 present in git repoĪfter googling a bit, i found that we can use git pull origin master to update our local copy of repoīut running that said - already up to date. I now do two changes - One in my github repo and other in my local copy.Ī) I added file 11 and 12 in my github repo. Lets say i clone a git repo which has 10 files inside it.Ĭurrently as i have just cloned, both my local copy and github repo are exactly same. If you don't want to integrate new changes directly, then you can instead use git fetch: this will only download new changes, but leave your HEAD branch and working copy files untouched. Instead, you should be able, with git version > 1.6.6, to checkout your remote branch using. By default, this integration will happen through a 'merge', but you can also choose a 'rebase': git pull origin master -rebase. ![]() ![]() and then point to master 1.git checkout master and then get the latest change 2.git pull 3.git merge dmgr2 4.git push -u origin master And then go back to your dmgr2 5.git checkout dmgr2. But what you do is git pull origin master, which pulls from master. git fetch -all Backup your current branch (e.g. ( Being new ,i am not claiming that its not working correctly, obviously there's issues with my understanding, hence the word expected ). first commit all your changes in dmgr2 branch. First, update all origin/ refs to latest.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |