Add an issue in 'Common Issues' section which addresses the confusion between performing a 'fetch' and a 'pull'. Signed-off-by: Shourya Shukla <shouryashukla.oo@xxxxxxxxx> --- Documentation/gitfaq.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Documentation/gitfaq.txt b/Documentation/gitfaq.txt index 5dfbb32089..04ea7be99f 100644 --- a/Documentation/gitfaq.txt +++ b/Documentation/gitfaq.txt @@ -255,6 +255,22 @@ way of cloning it in lesser space?:: presumes that the user has an always-on network connection to the original repository). See linkgit:partial-clone[1]. +[[fetching-and-pulling]] +How do I know if I want to do a fetch or a pull?:: + A fetch brings in the latest changes made upstream (i.e., the + remote repository we are working on) without modifying the current + branch or the working tree. This allows us to inspect + the changes made upstream and integrate all those changes (if + and only if we want to) or only cherry pick certain changes. + + A pull is a wrapper for a fetch and merge/rebase. This means that + doing a `git pull` will not only fetch the changes made upstream + but integrate them immediately with our current branch too. The + merge/rebase may go smoothly or have merge conflicts depending + on the case. Hence, a pull does not give the user a chance to + review changes before applying them to their local repository/current + branch. + Hooks ----- -- 2.26.2