git - Merging remote content to local repo -


I am trying to clone a remote repo in my local workspace, and set the content in a new bare repo To retain this, this repo needs to be updated occasionally with upstream repo, and new material should be pushed into the local repo also.

Here's an example:

  git clone Ssh: //username@whatevergitrepo.com/project   

and I have been using Project_Local In the form of an unmatched repo

  mkdir project_local.git git init --bare - Once the remote repo is cloned in my workspace, because there are several branches in this remote repo,  
  branch1 branch2. . Branches   

Even I have done to get all the branches remotely and pushed my local bare repo.

  CD project git branch -a & gt; & Amp; / Tmp / branchinfo sed s. * /, / Tmp / branchinfo & gt; & Amp; / Tmp / branchinfo1 # last '/' tmp / branchinfo1` before the actual name of the branch for this 'b'; Checkout GIT $ i; Check out all branches from the remote site # for `cat / tmp / branchinfo1`; GIT push project_local.git $ i; All the remote branches made in all the local branches I have made with all the materials. After this, the contents of the remote repo are now in my local repo, but how can I bring and merge all the remote changes of all the branches in all the related branches created in the local repo. ?  

I have tried to use 'git remote add', but it only works to bring the reforms, it does not actually contain the merge content.

Thanks in advance for any help I can get.

Thanks

Looks like you are updating the branches There is no merge as long as you are not counting fast firing merge which is actually only a reference update.

You only have to do this

  git fetch original-repo git branch-r | Cut -f3- -d ​​'/' | It assumes that you have already added a remote entry for your new repo and that it is  new-repo .   

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -