GIT

35 flashcardsby ismaelal
Study these flashcardsFree · spaced repetition · iPhone, Android, Mac & web

All cards

1
git config
Check your configuration settings
2
git add
add a file
3
git reset
unstage a file
4
git commit
commit a file
5
git checkout
revert
6
git checkout HEAD
revert from committed to working directory
7
git commit -m
for opening a text editor for longer message
8
git diff
compares working directory with the staging area for the next commit
9
git log
commit history
10
git log - patch -*
seeing only * last commits
11
git log -- stat
see only the abbreviated stats for each commit
12
git log --shortstat
only changed/insertions/deletions from --stat
13
git log --pretty
changes format of log output
14
git log --since --after --until --before
filters of log command
15
git log --author
author of commit
16
git log -S function_nam
commits on the function
17
git checkout --filename
discard a working directory file changes and restore its latest repository state
18
git checkout
discard all changes in the working directory
19
git checkout commit-id filename
retrieve a file from a specific commit into the staging area
20
git blame README
shows last author of each line
21
git rm fil
for removing files from working directory
22
git rm --cached
stopping Git to track it
23
git mv
for renaming a file
24
git tag -a v1.4 -m"my version 1.4"
tag with -a
25
git tag -l/--list "v1.8.5*"
for looking at 1.8.5 series
26
git tag -d
for deleting tags
27
git config --alias.co commit
renaming
28
git commit --amend
redo a commit
29
git reset HEAD CONTRIBUTING.md
unstage a commit
30
git checkout --CONTRIBUTING.md
unmodifying a modified file discard changes
31
git branch -v
last commit on each branch
32
git branch --merged
see which branches are already merged into the branch you're on
33
git branch --no-merged
to see the branches you haven't merged
34
git branch --move
to rename branch name
35
git push origin --delete branch_name
to delete the branch
Study all 35 cards for free