Skip to main content
Copy edited (e.g. ref. <https://en.wiktionary.org/wiki/let%27s#Contraction> and <http://en.wikipedia.org/wiki/Git_%28software%29>).
Source Link
Peter Mortensen
  • 31.3k
  • 22
  • 109
  • 132

As the message tells you,

Merge the remote changes (e.g. 'git pull')

Use git pull to pull the latest changes from the remote repository to your local repository. In this case, pulling changes will require a merge because you have made changes to your local repository.

I'll provide an example and a picture to explain. LetsLet's assume your last pull from origin/branch was at Commit B. You have completed and committed some work (Commit C). At the same time, someone else has completed their work and pushed it to origin/branch (Commit D). There will need to be a merge between these two branches.

local branch:                         --- Commit C 
                                    /
                                   /
                                  /
origin/branch: Commit A ------ Commit B ---- Commit D

Because you are the one that wants to push, gitGit forces you to perform the merge. To do so, you must first pull the changes from origin/branch.

local branch:                         --- Commit C -- Commit E
                                    /               /           
                                   /               /             
                                  /               /               
origin/branch: Commit A ------ Commit B ---- Commit D 

After completing the merge, you will now be allowed to fast-forward origin/branch to Commit E by pushing your changes.

Git requires that you handle merges yourself, because a merge may lead to conflicts.

As the message tells you

Merge the remote changes (e.g. 'git pull')

Use git pull to pull the latest changes from the remote repository to your local repository. In this case, pulling changes will require a merge because you have made changes to your local repository.

I'll provide an example and a picture to explain. Lets assume your last pull from origin/branch was at Commit B. You have completed and committed some work (Commit C). At the same time, someone else has completed their work and pushed it to origin/branch (Commit D). There will need to be a merge between these two branches.

local branch:                         --- Commit C 
                                    /
                                   /
                                  /
origin/branch: Commit A ------ Commit B ---- Commit D

Because you are the one that wants to push, git forces you to perform the merge. To do so, you must first pull the changes from origin/branch.

local branch:                         --- Commit C -- Commit E
                                    /               /           
                                   /               /             
                                  /               /               
origin/branch: Commit A ------ Commit B ---- Commit D 

After completing the merge, you will now be allowed to fast-forward origin/branch to Commit E by pushing your changes.

Git requires that you handle merges yourself because a merge may lead to conflicts.

As the message tells you,

Merge the remote changes (e.g. 'git pull')

Use git pull to pull the latest changes from the remote repository to your local repository. In this case, pulling changes will require a merge because you have made changes to your local repository.

I'll provide an example and a picture to explain. Let's assume your last pull from origin/branch was at Commit B. You have completed and committed some work (Commit C). At the same time, someone else has completed their work and pushed it to origin/branch (Commit D). There will need to be a merge between these two branches.

local branch:                         --- Commit C 
                                    /
                                   /
                                  /
origin/branch: Commit A ------ Commit B ---- Commit D

Because you are the one that wants to push, Git forces you to perform the merge. To do so, you must first pull the changes from origin/branch.

local branch:                         --- Commit C -- Commit E
                                    /               /           
                                   /               /             
                                  /               /               
origin/branch: Commit A ------ Commit B ---- Commit D 

After completing the merge, you will now be allowed to fast-forward origin/branch to Commit E by pushing your changes.

Git requires that you handle merges yourself, because a merge may lead to conflicts.

Altered my answer
Source Link
Jake Greene
  • 5.6k
  • 2
  • 23
  • 26

As the message tells you

Merge the remote changes (e.g. 'git pull')

Use git pull to pull the latest changes from the remote repository to your local repository. In this case, pulling changes will require a merge because you have made changes to your local repository.

I'll provide an example and a picture to explain. Lets assume your last pull from origin/branch was at Commit B. You have completed and committed some work (Commit C). At the same time, someone else has completed their work and pushed it to origin/branch (Commit D). There will need to be alloweda merge between these two branches.

local branch:                         --- Commit C 
                                    /
                                   /
                                  /
origin/branch: Commit A ------ Commit B ---- Commit D

Because you are the one that wants to push once, git forces you have properly mergedto perform the two commitsmerge. To do so, you must first pull the changes from origin/branch.

local branch:                         --- Commit C -- Commit E
                                    /               /           
                                   /               /             
                                  /               /               
origin/branch: Commit A ------ Commit B ---- Commit D 

After completing the merge, you will now be allowed to fast-forward origin/branch to Commit E by pushing your changes.

Git requires that you handle merges yourself because a merge may lead to conflicts.

As the message tells you

Merge the remote changes (e.g. 'git pull')

Use git pull to pull the latest changes from the remote repository to your local repository. In this case, pulling changes will require a merge because you have made changes to your local repository. You will be allowed to push once you have properly merged the two commits.

Git requires that you handle merges yourself because a merge may lead to conflicts.

As the message tells you

Merge the remote changes (e.g. 'git pull')

Use git pull to pull the latest changes from the remote repository to your local repository. In this case, pulling changes will require a merge because you have made changes to your local repository.

I'll provide an example and a picture to explain. Lets assume your last pull from origin/branch was at Commit B. You have completed and committed some work (Commit C). At the same time, someone else has completed their work and pushed it to origin/branch (Commit D). There will need to be a merge between these two branches.

local branch:                         --- Commit C 
                                    /
                                   /
                                  /
origin/branch: Commit A ------ Commit B ---- Commit D

Because you are the one that wants to push, git forces you to perform the merge. To do so, you must first pull the changes from origin/branch.

local branch:                         --- Commit C -- Commit E
                                    /               /           
                                   /               /             
                                  /               /               
origin/branch: Commit A ------ Commit B ---- Commit D 

After completing the merge, you will now be allowed to fast-forward origin/branch to Commit E by pushing your changes.

Git requires that you handle merges yourself because a merge may lead to conflicts.

Altered my answer
Source Link
Jake Greene
  • 5.6k
  • 2
  • 23
  • 26

As the message tells you

Merge the remote changes (e.g. 'git pull')

Use git pull to pull the latest changes from the remote repository to your local repository. In this case, whichpulling changes will require a merge because you may needhave made changes to merge with your commitlocal repository. You will be allowed to push once you have properly merged the two commits.

Git requires that you handle merges yourself because a merge may lead to conflicts.

As the message tells you

Merge the remote changes (e.g. 'git pull')

Use git pull to pull the latest changes, which you may need to merge with your commit. You will be allowed to push once you have properly merged the two commits.

Git requires that you handle merges yourself because a merge may lead to conflicts.

As the message tells you

Merge the remote changes (e.g. 'git pull')

Use git pull to pull the latest changes from the remote repository to your local repository. In this case, pulling changes will require a merge because you have made changes to your local repository. You will be allowed to push once you have properly merged the two commits.

Git requires that you handle merges yourself because a merge may lead to conflicts.

Altered my answer
Source Link
Jake Greene
  • 5.6k
  • 2
  • 23
  • 26
Loading
Source Link
Jake Greene
  • 5.6k
  • 2
  • 23
  • 26
Loading