Git/Version Control

Andrew Watters
Flashcards by , created 7 months ago

Set of cards outlining Git and Version Control basics, as well as terminal commands for some common operations.

Andrew Watters
Created by Andrew Watters 7 months ago
Computer Science
GCSE Computer Science (AQA)
Wolfie Ruth
Think Python
CPA Exam Flashcards
Biology (B2)
Sian Griffiths
GCSE Computing: Hardware
Awais Butt
Computer Systems
OCR gcse computer science
Jodie Awthinre
GCSE Computing: Hardware
Yasmin F
computer systems and programming quiz
Molly Batch
Question Answer
What is Git? Git is a local version control and revision management system. It allows users to track changes to projects as well as track history and different versions (branches).
git add <filepath> Add file contents to the index, staging them for commit. Individual files and entire directories can be added. Git Commit (binary/octet-stream)
git clone <url> Clones a (usually remote) repository, creating a new directory with the same name. Git Clone (binary/octet-stream)
git commit -m "<message>" Record changes to the repository. Files are first staged and usually a descriptive commit message is included. Git Commit (binary/octet-stream)
git checkout <args> Switch branches or restore working tree files. If no path is given, git checkout will update HEAD to set the specified branch as the current branch. Git Checkout (binary/octet-stream)
git branch <args> Lists, creates, or deletes git branches. Git Checkout (binary/octet-stream)
git diff <filepath> Show changes between the working tree and index, changes between two files on disc, or changes between two working trees. Git Diff (binary/octet-stream)
git fetch <args> Fetch refs from one or more repositories. Unlike "git pull", remote changes will not be incorporated and HEAD will not be updated. Git Fetch (binary/octet-stream)
git <command> --help Prints the synopsis and a list of the most commonly used commands for the given operation.
git init Create an empty Git repository or reinitialize an existing one.
git pull Incorporates changes from a remote repo. into the current branch. Shorthand for git fetch followed by git merge FETCH_HEAD. Git Fetch (binary/octet-stream)
git status Show the working tree status. This is commonly done before a commit to check which files are staged to be committed. Git Status (binary/octet-stream)
git push Updates remote refs using local refs. Essentially "pushes" committed changes from local repository to the remote repo. Git Push (binary/octet-stream)
git merge <args> Incorporates changes from named commits into the current branch. This is the second sub-process of "git pull". Git Merge (binary/octet-stream)
git log Show the commit logs, with author, date/time, and commit ID's for all previous commits. Git Log (binary/octet-stream)
git remote Manage a set of tracked repositories. Useful for updating the remote repository URL (git remote set-url origin <url>). Git Remote (binary/octet-stream)
man git Shows the git manual (verbose) and list of all git commands with descriptions. Further documentation is also available at: There are also some GREAT tutorials at: