Push makes sure that your work is not only in your computer but “online” as well which means:
Now, what if you you make changes directly on the GitHub repository or using another machine ? These changes are not locally synchronized with your primary computer. This is where pull comes into play.
Navigate to your repository in GitHub and scroll down to README.md. GitHub automatically uses this file as a landing page to a repository which at the moment should be a mere git-lesson.
README.md
for editingTo edit this file click on the small pencil icon on the top right hand corner. This icon is available for any file if you click on it but specifically for README.md
it’s also available as soon as you enter your repository.
This will open up an editable version of the README.md
file on GitHub that we can edit in the browser.
README.md
Now let’s add some more details about the content’s of our repo to our README using Markdown text (more on markdown later.
I added the following:
# git-lesson
This repo was created as part of the Version Control for researchers workshop
**Location:** Online
When editing files on GitHub our issue, the main body of the editor contains two tabs:
Toggle the tabs below to explore this feature. Note how #
and ***
notation is rendered in the Preview tab.
README.md
Once you are happy with your changes, go ahead and commit them by clicking the Commit changes button.
This opens up a panel that should look somewhat familiar to you by now. Go ahead and enter an informative commit message. Also, leave the option to Commit directly to the main
branch selected and click on Commit changes.
The changes to the README.md
file have now been committed:
And are also now visible on the landing page of our repository:
Now back in GitKraken Client, we see that our remote repository is ahead of our local one.
In order to synchronize the local with the remote repository we can use Pull. This will “download” any updates from the remote repository to our local one.
Everything is now in synch again!