4 ms·
> most commands or command flags simply help the user do something in an automated fashion that you could do by typing each specific command out (i.e., git pull
by darkerside 10y ago
> most commands or command flags simply help the user do something in an automated fashion that you could do by typing each specific command out (i.e., git pull --rebase)
A tangent perhaps, but would you mind expanding on this? I use `git pull --rebase` frequently, and I'm not sure how this fits into what you described. Is it the specific command, or the automated shortcut? And what's the counterpart?
Just trying to check my mental model.
- mbrock 10y agoFrom the "git-pull" man page: > Incorporates changes from a remote repository into the current branch. In its default mode, git pull is shorthand for git fetch followed by git merge FETCH_HEAD. > More precisely, git pull runs git fetch with the given parameters and calls git merge to merge the retrieved branch heads into the current branch. With --rebase, it runs git rebase instead of git merge.
- neckro23 10y ago"git pull" is just a shortcut for running "git fetch" and then merging (or rebasing) the current branch to its upstream. IMO this is a stumbling block for a lot of people new to Git -- for example it covers up the fact that "remote" branches are a separate reference ("master" and "origin/master" are not the same branch!).
- strictfp 10y ago"remote" branches are called remote-trackimg branches. And yes, it's very confusing. Especially when git status says "up to date with origin/master", but pulls down loads of stuff when you pull...
- justinlaster 10y agoI had a comment written up, but I decided to test my claim in my original post about a "litany of literature", and sure enough this has been documented elsewhere: http://gitolite.com/git-pull--rebase http://gitolite.com/git-pull--rebase I searched for "how does git pull --rebase work"