I use git pull origin to update my local source tree, but the wiki (https://reactos.org/wiki/ReactOS_Git_For_Dummies) says "We don’t recommend using pull, but rather to use fetch and rebase."
What is wrong with pull?
What is wrong with 'git pull' to update a local source tree
Moderator: Moderator Team
What is wrong with 'git pull' to update a local source tree
Please keep the Windows classic 9x/2000 look and feel.
The layman's guides - debugging - bug reporting - compiling - ISO remaster.
They may help you with a problem, so do have a look at them.
The layman's guides - debugging - bug reporting - compiling - ISO remaster.
They may help you with a problem, so do have a look at them.
- Fraizeraust
- Posts: 234
- Joined: Thu Jan 05, 2017 11:46 am
- Location: Italy
- Contact:
Re: What is wrong with 'git pull' to update a local source tree
As per these two links:
https://stackoverflow.com/a/7104747
https://www.git-tower.com/learn/git/faq ... h-git-pull
The point being if you have any uncommitted changes in your directory tree, the recommended option is to fetch and rebase your local repository without breaking your local changes. git pull should be used ONLY when your working directory is clean.
https://stackoverflow.com/a/7104747
https://www.git-tower.com/learn/git/faq ... h-git-pull
The point being if you have any uncommitted changes in your directory tree, the recommended option is to fetch and rebase your local repository without breaking your local changes. git pull should be used ONLY when your working directory is clean.
a.k.a. GeoB99 -- ReactOS Kernel developer -- My Wiki page
Re: What is wrong with 'git pull' to update a local source tree
Thanks Fraizeraust.
So for those of us that only use a local copy of trunk to compile, then git pull is OK.
If I have merged a patch into my local copy and want to preserve the merge, but update from master, then I would need to use fetch and rebase.
Is that correct?
So for those of us that only use a local copy of trunk to compile, then git pull is OK.
If I have merged a patch into my local copy and want to preserve the merge, but update from master, then I would need to use fetch and rebase.
Is that correct?
Please keep the Windows classic 9x/2000 look and feel.
The layman's guides - debugging - bug reporting - compiling - ISO remaster.
They may help you with a problem, so do have a look at them.
The layman's guides - debugging - bug reporting - compiling - ISO remaster.
They may help you with a problem, so do have a look at them.
- Fraizeraust
- Posts: 234
- Joined: Thu Jan 05, 2017 11:46 am
- Location: Italy
- Contact:
Re: What is wrong with 'git pull' to update a local source tree
In this case yes. You can safely do a pull from the upstream "master branch" repository to your origin (forked/local) repository.oldman wrote:So for those of us that only use a local copy of trunk to compile, then git pull is OK.
You're correct. git apply will result to the specific XYZ file (depending on the patch) being un-staged for the commit thus uncommitted. For this matter you've got to fetch your repository which means it'll download the objects and refs from another repository and then rebase.oldman wrote:If I have merged a patch into my local copy and want to preserve the merge, but update from master, then I would need to use fetch and rebase.
After all, git pull is basically a combination of "git fetch" and "git merge". git pull is not bad per se, what does it matter the most is WHEN you use it. And when it comes to un-staged file(s) (the modifications done to the file) you have a high chance of probability to get a merge conflict due to "git merge".
a.k.a. GeoB99 -- ReactOS Kernel developer -- My Wiki page
Re: What is wrong with 'git pull' to update a local source tree
Aside note: we want to have linear history (and not a bush-tree history) when stuff is later committed.
Who is online
Users browsing this forum: Google [Bot] and 27 guests