Advanced Programming in the UNIX Environment

Using git(1)

Summary

Learning to use a code revision system and collaborating with others is an important aspect of programming. Git is a popular free and open source distributed version control system and well worth knowing at least the fundamental of.

Note: git(1) can be used without and independent of GitHub! In this class, we will use git(1) for your course notes, as well as for your midterm-, group-, and final projects.

You can create a repository on any Unix system you have access to, or even use a public repository such as on GitHub.

Shared repositories

For your group project, you will need to use a shared repository for your team. One way to do this would be to use a public hosting service, such as GitHub or GitLab; another way would be to keep the repository on e.g. linux-lab.cs.stevens-tech.edu and allow local access by way of suitable unix group permissions; a third way might be for one of you to host the repository on your own server and grant your team members access there.

Working with git

You should make it a habit to begin your working session by updating your copy of the repository and ending it by committing your changes. If you are ready to push your changes, you would then push them to the repository:

$ cd group1
$ git pull
$ $EDITOR notes
[edit]
$ git commit
$ git push

Please always write a meaningful commit message. See these links for why/how:


[Course Website]