>>> "MT" == Magnus Therning <mag...@therning.org> writes:
> Uwe Brauer <o...@mat.ucm.es> writes: >> [[S/MIME Signed Part:Undecided]] >> >>> Uwe Brauer <o...@mat.ucm.es> writes: >> >> >>> If you read the text is says that it would _overwrite_ local >>> changes. I think it's very nice of git to help you not lose >>> work. >>> If all you want to do is get the upstream changes to your local >>> system you should look at the command `git fetch`. >> >> Ok, thanks, it seems that >> hg pull -u <==> git fetch >> git pull <==> hg fetch > Another, more `git` centric, way to think of `git pull` is as `git > fetch` followed by `git merge`. Which, BTW, is precisely what hg fetch does: hg pull -u & hg merge Purists advice against it, and I am more and more convinced that they are right >>> You should drop the `-b`, you switch to your branch using just >>> `git checkout vc-diff-disp`. Then you need to stage your >>> changes >>> `git add lisp/vc/diff-mode.el lisp/vc/vc.el`, and finally >>> commit >>> them with `git commit`. >> >> Ok git checkout vc-diff-disp did work but I still could not >> commit. >> >> It turned out that I needed >> >> git add lisp/vc/diff-mode.el >> git add lisp/vc/vc.el >> >> >> And that I really don't understand. >> These files were modified not created. > In `git` you don't add files, you add (_stage_) changes. That is, > you `git add` > - new files (make them known to `git`) > - changes to files already known to `git` > - parts of change to files already known to `git` (see `git add > -p`) So do I understand you correctly. I *always* have to run git add (-p) Before git ci? If so then I will try to use emacs's git interface. BTW, I came across https://gregoryszorc.com/blog/2017/12/11/high-level-problems-with-git-and-how-to-fix-them/ in which the author claims: ,---- | that Git is just a content indexed key-value store consisting of a different object types (blobs, trees, and commits) that have a particular relationship with each other. `---- I can't say that I understand that, but he also states that one could disable the staging. Can't find anything about it. Hm Anyway emacs's interface might be enough (usually use hg-git but for very large repositories it is slow). > One big difference in `git`, at least IIRC from when I still used > mercurial, is the concept of _staging_. > /M -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/git-users/87czpbtbb0.fsf%40mat.ucm.es.
smime.p7s
Description: S/MIME cryptographic signature