Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Git is a widely used software version control system that is used when people in groups develop software together. Most open source and proprietary sofware software systems are developed with some sort of version control system, with Git being the most popular.

At Rhodes, many professors use Git as a framework for distributed skeleton code and collecting programming assignments.

Info

The documentation here is a small glimpse into programming with Git – enough to get started. For a more detailed treatment, check out the free online book: https://git-scm.com/book/en/v2

Creating a Github Account

...

$ ssh-keygen -t rsa -b 4096

This will prompt you First, this command will ask you to enter a filename to store the key into. You can just press enter as the default file is the one we want (/home/<username>/.ssh/id_rsa). Next, you will be prompted to make a passphrase. This is similar to a password, but should be longer and stronger. Make it something you won’t forget, but don’t worry – you won’t be typing it all the time like a normal password.

...

Pulling in Updates from the GitHub Repository

The last stop on our (very) brief overview of Git is how to merge updates from the GitHub repository into your local version. You may need to do this if your professor updates the starter code and/or you are working with multiple developers and need to integrate their contributions into your local repository.

This operation is pretty simple:

$ git pull

Usually this will go off without a hitch, but it’s possible that you have local modifications to a portion of your code that someone else also modified. These are called merge conflicts and require special care to resolve (and is outside the scope of this tutorial).