Friday 4 April 2014

To add to one GIT repository to another repository on same machine

Well, what I have done here is I have development and production repositories on my PC which were exclusively linked to their own GitHub repositories.

Now, I would like to update my production repo from development locally and push back to production repository on GitHub.

And here is my commands;

# Go to local "production" repo
 
$ cd project.production/  
RC@MyPC-001 /c/xampp/htdocs/project.production (master)

$ git remote add development /c/xampp/htdocs/hillingdon/dev.hcp.branch
RC@MyPC-001 /c/xampp/htdocs/project.production (master)

$ git fetch development

$ git merge development/
development/forum-devt   development/master // This is because I had two branch on my development repo

$ git merge development/master // I am merging the master branch only

// If you got any conflicts, please resolve them and add them all
 
$ git add --all 

No comments:

Post a Comment

Please post any queries and comments here.