Now that we reverted our local chatbot
repo to an older version, the remote repo actually has a newer commit than our local repo. This happens often in projects when other people make changes to code, and push it to a remote repo. Here's a diagram showing which commits exist in which locations:
RemoteLocalc12c12README.mdREADME.mdThisisaThisisaREADME.README.c53README.mdThisisthebestREADME!
In cases where the latest commit in your local repo is older than the latest commit in the remote repo, you can use git pull to update the current branch with the latest commits. git pull
will also update your working directory to have the same files as the latest commit.
In our case, we'll be updating the master
branch, since the chatbot
repo only has a single branch.
Instructions
- Pull the latest commits from the
chatbot
remote repo. - Inspect the working directory and git history to see what happened
/home/dq/chatbot$ cd /home/dq/chatbot
/home/dq/chatbot$ git pull
Updating 812c59f..71977ec
Fast-forward
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)