Home
Explore
Exams
Search for anything
Login
Get started
Home
Engineering
Computer Science
Git Commands
5.0
(1)
Rate it
Studied by 12 people
Learn
Practice Test
Spaced Repetition
Match
Flashcards
Card Sorting
1/39
Earn XP
Description and Tags
Computer Science
University/Undergrad
Add tags
Study Analytics
All
Learn
Practice Test
Matching
Spaced Repetition
Name
Mastery
Learn
Test
Matching
Spaced
No study sessions yet.
40 Terms
View all (40)
Star these 40
1
New cards
start a git repo from scratch
$ mkdir my_project
$ cd my_project
$ git init
2
New cards
clone a repo
$ git clone path_to_repo
3
New cards
see hidden directory with repo info
$ ls -a
4
New cards
set up git name
$ git config --global user.name your-name
5
New cards
set up git email
$ git config --global user.email your-email
6
New cards
add a file
$ git add file
7
New cards
unstage a file
$ git reset
8
New cards
commit a file
$ git commit -m “commit text”
9
New cards
revert stage
$ git checkout
10
New cards
revert push
$ git checkout HEAD
11
New cards
verschil voor en na stage
$ git diff
12
New cards
verschil voor en na push
$ git diff HEAD
13
New cards
see status / current branch
$ git status
14
New cards
check commit history
$ git log
15
New cards
discard working directory file changes
$ git checkout -- filename
16
New cards
discard all changes in working directory
$ git checkout .
17
New cards
retrieve file from specific commit into stage
$git checkout commit-id filename
18
New cards
check who edited what
git blame filename
19
New cards
show branches and the commit it points to
$ git branch -v
20
New cards
commit log
git log
21
New cards
commit log and show commit summary in one line
git log --oneline
22
New cards
commit log and add branch info
git log --decorate
23
New cards
commit log and include all branches
git log --all
24
New cards
switch to another branch
git checkout otherBranch
25
New cards
what happens when you switch to another branch?
points head to named branch and updates directory
26
New cards
show branches
$ git branch
27
New cards
what does $ git branch do?
it returns branches and puts a \* in front of the current branch
28
New cards
create new branch
$ git branch name
29
New cards
create and select new branch
$ git checkout -b name
30
New cards
merge the work on “name” back into master
$ git checkout master
$ git merge name
31
New cards
delete branches
$ git branch -d name
32
New cards
finish merge after conflict
$ git add file
$ git commit
33
New cards
go back after merge conflict
$ git merge --abort
34
New cards
add remote
$ git remote add name id
35
New cards
add reference to repo on remote machine with ‘name’
$ git remote -v
36
New cards
send local commits to remote
$ git push
\
37
New cards
update our knowledge of the remote
$ git fetch
38
New cards
use remote commits
$ git merge
39
New cards
shortcut for fetch & merge
$ git pull
40
New cards
create local clone
$ git clone link
Explore top notes
1.2 Pitch, Dynamics, and Tone Color
Updated 905d ago
Note
Preview
Divina Comedia por Dante Alighieri - Paraíso
Updated 94d ago
Note
Preview
Chapter 5 Religion stud guide
Updated 752d ago
Note
Preview
Chemistry moles stuff
Updated 109d ago
Note
Preview
Untitled
Updated 958d ago
Note
Preview
Chapter 1: Thinking Critically With Psychological Science
Updated 1143d ago
Note
Preview
Photosynthesis!
Updated 1080d ago
Note
Preview
Prefixes
Updated 395d ago
Note
Preview
Explore top flashcards
Vocabulary Workshop Level B - Unit 15
Updated 394d ago
Flashcards (20)
Preview
ARCH 214A: World History of Architecture- Final Exam Terms
Updated 388d ago
Flashcards (97)
Preview
APHUG 5 vocab
Updated 95d ago
Flashcards (61)
Preview
verbos de camping + reflexive stuff
Updated 468d ago
Flashcards (63)
Preview
Cardiovascular System
Updated 215d ago
Flashcards (108)
Preview
El entierro Adriana Ramírez
Updated 130d ago
Flashcards (88)
Preview
psych (5. thinking+decisions)
Updated 541d ago
Flashcards (50)
Preview
TQM Finals!!!!
Updated 1d ago
Flashcards (144)
Preview