Talk:Installing Moodle from Git repository: Difference between revisions
Mark Johnson (talk | contribs) |
No edit summary |
||
Line 12: | Line 12: | ||
Nope, I've always just done fetch/merge instead of pull. You're welcome to change it if pull is generally accepted as better/safer! [[User:Mark Johnson|Mark Johnson]] 14:49, 15 March 2011 (UTC) | Nope, I've always just done fetch/merge instead of pull. You're welcome to change it if pull is generally accepted as better/safer! [[User:Mark Johnson|Mark Johnson]] 14:49, 15 March 2011 (UTC) | ||
: Actually, I prefer separate fetch and merge too. The fetch tells you if anything has changed. That is, whether there is anything to merge. Also, doing it this way, you can do the merge as | |||
git merge --ff-only origin/master | |||
That will only update the branch if it is a simple update. That is, if there are no local changes that would require a real merge. That ensures your local master branch stays exactly the same as the origin master branch. Obviously, you can only do that if you keep all your customisations on another branch.--[[User:Tim Hunt|Tim Hunt]] 15:27, 15 March 2011 (UTC) |
Latest revision as of 15:27, 15 March 2011
git pull?
Is there a reason for using two commands:
git fetch git merge origin/master
when the single command:
git pull
would achieve the same effect (without the danger of merging into the wrong branch)?--David Smith 2 10:55, 15 March 2011 (UTC)
Nope, I've always just done fetch/merge instead of pull. You're welcome to change it if pull is generally accepted as better/safer! Mark Johnson 14:49, 15 March 2011 (UTC)
- Actually, I prefer separate fetch and merge too. The fetch tells you if anything has changed. That is, whether there is anything to merge. Also, doing it this way, you can do the merge as
git merge --ff-only origin/master
That will only update the branch if it is a simple update. That is, if there are no local changes that would require a real merge. That ensures your local master branch stays exactly the same as the origin master branch. Obviously, you can only do that if you keep all your customisations on another branch.--Tim Hunt 15:27, 15 March 2011 (UTC)