Using Git just keeping Vanilla Core + Addons up-to-date (as a user, not a dev)?
I have to confess that I'm a little lost with using git. I only want to keep the cloned git repository up-to-date, but I'm not sure I'm doing it right:
- I have successfully cloned Garden and Addons
- I have switched garden to the 2.1 branch and left addons at master branch
When I enter the Garden or Addons directory and try git pull the following happens:
# git pull
remote: Counting objects: 263, done.
remote: Compressing objects: 100% (57/57), done.
remote: Total 163 (delta 123), reused 146 (delta 106)
Receiving objects: 100% (163/163), 15.49 KiB, done.
Resolving deltas: 100% (123/123), completed with 49 local objects.
From git://github.com/vanillaforums/Garden
c7a3a72..2b42695 master -> origin/master
c9374c8..6a3282f release/2.2 -> origin/release/2.2
You asked me to pull without telling me which branch you
want to merge with, and 'branch.2.1.merge' in
your configuration file does not tell me either. Please
name which branch you want to merge on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details on the refspec.
If you often merge with the same branch, you may want to
configure the following variables in your configuration
file:
branch.2.1.remote = <nickname>
branch.2.1.merge = <remote-ref>
remote.<nickname>.url = <url>
remote.<nickname>.fetch = <refspec>
See git-config(1) for details.
I am clearly missing something, but I have no idea what. Any hint?
Tagged:
5
Comments
I use
git fetchinstead ofgit pull, since fetch only fetch changes, without auto merge.Let me explain a tipical workflow:
git clone https://github.com/lifeisfoo/Garden.git. This repository is now myoriginrepositorygit remote add upstream https://github.com/vanillaforums/Garden.gitNow I can keep my repository up-to-date:
git fetch upstreamto get vanilla main repo changes locallygit merge upstream/release/2.2 release/2.2to update my local release/2.2 branchgit checkout -b my-branch upstream/release/2.2) you need to update this branch too, usinggit merge upstream/release/2.2 my-branch-upstreamorgit merge release/2.2 my-branch-upstreamifrelease/2.2is up-to-date.git push originNote that if don't want to make changes to Garden, the origin repository is useless and you can clone
vanilla/Gardendirectly (becoming youroriginrepo).I hope this help
There was an error rendering this rich post.