responsive

× Close

While reporting problems, please include the following:

  • The name of the machine you are working on
  • The problem you are having
  • The exact text of the error message you are getting
  • If possible, include the sequence of commands you executed
so we can try to duplicate the problem and figure out what is going wrong. This will ensure that your issue is resolved in a timely fashion.

For Linux/Unix Problems, email coes-unixadm@clemson.edu

Git Quick Start Guide

Back to Linux/Unix Support


Begin by cloning the remote repository onto your local machine.

  • git clone <username>@<remote_host>:/repo/location

To begin tracking a new file use the command git add

  • git add <file_name>

To view the status of files to be committed use the command git status (no arguments).

  • git status

To commit stages changes use the command git commit

  • git commit <file_name>

To push your committed changes to the remote git server use the push command.

  • git push origin master <file_name>

Branching off of the local repo is done using the branch command.

  • git branch <new_branch>

A list of all branches can be viewed by executing the branch command with no arguments.

  • git branch

To tell git to ignore certain files types, create a file called .gitignore

  • $ cat .gitignore
  • # a comment - this is ignored
  • *.a # no .a files
  • !lib.a # but do track lib.a, even though you're ignoring .a files above
  • /TODO # only ignore the root TODO file, not subdir/TODO
  • build/ # ignore all files in the build/ directory
  • doc/*.txt # ignore doc/notes.txt, but not doc/server/arch.txt

Other useful links: