🖥️
Introduction to Git and GitHub
  • Getting Started
  • Background
    • What is Version Control?
    • What is Git?
    • How do I use Git with GitHub?
  • Set Up
    • Install Git
    • Create a GitHub Account
  • Repository
    • Introduction
    • Create Repository
    • Cloning Repository
  • Git Commands
    • Introduction
    • git status, git add, git commit, git push
    • git pull
  • Conclusion
  • Extra Resources
  • Original Documentation
Powered by GitBook
On this page

Was this helpful?

  1. Git Commands

git pull

Previousgit status, git add, git commit, git pushNextConclusion

Last updated 4 years ago

Was this helpful?

If you have collaborators on your repository or you decide to update your repository from a different computer (i.e a school computer or a virtual machine), you may have updates on your remote repository that are not on your local computer

We can also create changes to our repository directly on github.com. In our example, we will make changes to our "add_numbers.r" file.

Go to your "add_numbers.r" file and click on the pencil icon in the corner.

We will add another function to the file titled "add_three_numbers," which I think is pretty self-explanatory.

Below our text box, GitHub has already set up a commit message. Once we've clicked "commit changes", our repository is updated.

Now head back over to your terminal, change directories into your local repository folder, and type "git pull"

The warning in the beginning may appear, but it is only a warning and not a problem with the actual pull request. You will not normally be getting this warning, but if you do, don't worry. Follow the prompts to prevent it from happening again, or just ignore it.

Now if you check your R script file on your local computer, you will see our additional function!