Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Using Git just keeping Vanilla Core + Addons up-to-date (as a user, not a dev)?
MasterOne
✭✭
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 fetch
instead 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 myorigin
repositorygit remote add upstream https://github.com/vanillaforums/Garden.git
Now I can keep my repository up-to-date:
git fetch upstream
to get vanilla main repo changes locallygit merge upstream/release/2.2 release/2.2
to 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-upstream
orgit merge release/2.2 my-branch-upstream
ifrelease/2.2
is up-to-date.git push origin
Note that if don't want to make changes to Garden, the origin repository is useless and you can clone
vanilla/Garden
directly (becoming yourorigin
repo).I hope this help
There was an error rendering this rich post.