From: Junio C Hamano Date: Wed, 13 May 2020 19:19:19 +0000 (-0700) Subject: Merge branch 'ss/faq-fetch-pull' X-Git-Tag: v2.27.0-rc0~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=94afbbb8de3d6a80602e7e27d559d2bdeffb0be4;p=thirdparty%2Fgit.git Merge branch 'ss/faq-fetch-pull' Random bits of FAQ. * ss/faq-fetch-pull: gitfaq: fetching and pulling a repository --- 94afbbb8de3d6a80602e7e27d559d2bdeffb0be4 diff --cc Documentation/gitfaq.txt index 11d9bac859,1846d90f94..370d62dae4 --- a/Documentation/gitfaq.txt +++ b/Documentation/gitfaq.txt @@@ -223,16 -223,14 +223,24 @@@ a file checked into the repository whic can then be copied alongside and modified as appropriate. This second, modified file is usually ignored to prevent accidentally committing it. +[[files-in-.gitignore-are-tracked]] +I asked Git to ignore various files, yet they are still tracked:: + A `gitignore` file ensures that certain file(s) which are not + tracked by Git remain untracked. However, sometimes particular + file(s) may have been tracked before adding them into the + `.gitignore`, hence they still remain tracked. To untrack and + ignore files/patterns, use `git rm --cached ` + and add a pattern to `.gitignore` that matches the . + See linkgit:gitignore[5] for details. + + [[fetching-and-pulling]] + How do I know if I want to do a fetch or a pull?:: + A fetch stores a copy of the latest changes from the remote + repository, without modifying the working tree or current branch. + You can then at your leisure inspect, merge, rebase on top of, or + ignore the upstream changes. A pull consists of a fetch followed + immediately by either a merge or rebase. See linkgit:git-pull[1]. + Hooks -----