GIT Memorize Flashcards
XML, JSON, YAML - Which one is “hefty” and not very human readable?
XML
XML, JSON, YAML - Mostly used for transmitting data between server and a web page
JSON
XML, JSON, YAML - syntax uses curly braces, square brackets, and quotes for its data representation
JSON
Git check staus
Git status
Initialize a local git repo
Git init
Git add files to staging area
Git add. Or git add -A
Git commit changes
Git commit -m “stuff”
Git remove a file or folder
Git rm -r [filename]
List branches
Git branch
List all branches local and remote
Git branch -a
Create a new branch
git branch [branch name]
Delete a branch
git branch -d [branch name]
Delete a remote branch
git push origin –delete [branch name]
Create a new branch and switch to it
git checkout -b [branch name]
Clone a remote branch and switch to it
git checkout -b [branch name] origin/[branch name]
Rename a local branch
git branch -m [old branch name] [new branch name]
Switch to a branch
git checkout [branch name]
Switch to the branch last checked out
git checkout -
Discard changes to a file
git checkout – [file-name.txt]
Merge a branch into the active branch
git merge [branch name]
Merge a branch into a target branch
git merge [source branch] [target branch]
Stash changes in a dirty working directory
git stash
Remove all stashed entries
git stash clear
Push a branch to your remote repository
git push origin [branch name]