Git for Software Development

This document provides resources for using Git

Andrew L. Mackey

Overview

Git is a distributed version control system. It can be used to track changes and collaborate among other developers across systems. The following instructions can be used to help you utilize the Git in your programming projects.

 

Git Basics

Git Global Username and Email

git config --global user.name "Jane Doe"
git config --global user.email "jdoe@uafs.edu"

You can validate the success of the commands by typing the following:

git config --list

It will output the following:

user.name=Jane Doe
user.email=jdoe@uafs.edu

You can find the information in the .gitconfig file:

[user]
    name = Jane Doe
    email = jdoe@yourdomain.com

Cache Credentials

git config --global credential.helper cache

Run one of the following:

# Cache for 1 hour
git config --global credential.helper "cache --timeout=3600"

# Cache for 1 day
git config --global credential.helper "cache --timeout=86400"

# Cache for 1 week
git config --global credential.helper "cache --timeout=604800"