Git study cards

69 cards. Each one explains a command, part by part.

#069: Creating an annotated tag. git tag -a name -m 'text'
#069 git tag -a name -m 'text'
#068: creating a tag. git tag name
#068 git tag name
#067: listing available tags. git tag
#067 git tag
#066: What is a tag
#066 What is a tag concept
#065: Making an empty commit without an editor. git commit --allow-empty -m 'text'
#065 git commit --allow-empty -m 'text'
#064: What is the .gitignore file
#064 What is the .gitignore file concept
#063: Deleting a tracked file from your repository. git rm file.txt
#063 git rm file.txt
#062: What is the .gitkeep file
#062 What is the .gitkeep file concept
#061: Adjusting the message of the last commit without an editor. git commit --amend -m 'text'
#061 git commit --amend -m 'text'
#060: Undoing a commit. git revert 09c6d68
#060 git revert 09c6d68
#059: What is a merge request
#059 What is a merge request concept
#058: Making a commit. git commit
#058 git commit
#057: Undoing the commit most recent. git reset HEAD~
#057 git reset HEAD~
#056: What is an issue
#056 What is an issue concept
#055: Checking changes in staging. git diff --staged
#055 git diff --staged
#054: What is a commit
#054 What is a commit concept
#053: Textually searching commit messages. git log --all --grep='word'
#053 git log --all --grep='word'
#052: Renaming a file. git mv source target
#052 git mv source target
#051: Making an empty commit. git commit --allow-empty
#051 git commit --allow-empty
#050: Pulling changes. git pull remote branch
#050 git pull remote branch
#049: Merging two branches. git merge source target
#049 git merge source target
#048: Renaming a branch. git branch -M name
#048 git branch -M name
#047: How to clone from a specific branch. git clone -b name
#047 git clone -b name
#046: applying a stash without removing it from the pile. git stash apply stash@{2}
#046 git stash apply stash@{2}
#045: Throwing out a stash. git stash drop stash@{2}
#045 git stash drop stash@{2}
#044: Removing a stash from the stack and applying it. git stash pop
#044 git stash pop
#043: How to list stashes that already exist. git stash list
#043 git stash list
#042: Naming a stash. git stash -m 'changes'
#042 git stash -m 'changes'
#041: Saving changes for later. git stash push
#041 git stash push
#040: What is stash
#040 What is stash concept
#039: Reusing the commit message. git commit -C ORIG_HEAD
#039 git commit -C ORIG_HEAD
#038: Undoing commits softly. git reset HEAD^ --soft
#038 git reset HEAD^ --soft
#037: Undoing the last commit. git reset HEAD^
#037 git reset HEAD^
#036: Undoing multiple commits. git reset HEAD~3
#036 git reset HEAD~3
#035: Switching branches when creating a new branch. git switch -c name
#035 git switch -c name
#034: Switching branch. git switch name
#034 git switch name
#033: Naming the clone destination folder. git clone url name
#033 git clone url name
#032: Discarding changes. git restore name
#032 git restore name
#031: Adjusting the last commit. git commit --amend
#031 git commit --amend
#030: What is a conflict
#030 What is a conflict concept
#029: How to remove a file from staging. git restore --staged name
#029 git restore --staged name
#028: Using rebase to fix branch source. git rebase --onto source previous branch
#028 git rebase --onto source previous branch
#027: Using rebase to update a branch. git rebase source target
#027 git rebase source target
#026: Forcing the deletion of a branch. git branch -D name
#026 git branch -D name
#025: Deleting a branch locally. git branch -d name
#025 git branch -d name
#024: How to push. git push remote branch
#024 git push remote branch
#023: How to create branch tracking on remote. git push --set-upstream remote branch
#023 git push --set-upstream remote branch
#022: How to rename a remote. git remote rename current name
#022 git remote rename current name
#021: How to create a Remote. git remote add name url
#021 git remote add name url
#020: How to list remotes. git remote -v
#020 git remote -v
#019: What is a remote
#019 What is a remote concept
#018: How to clone a repository. git clone url
#018 git clone url
#017: What is a clone?
#017 What is a clone? concept
#016: What is a fork?
#016 What is a fork? concept
#015: What is a diff?
#015 What is a diff? concept
#014: Switching branches when creating a new branch. git checkout -b name
#014 git checkout -b name
#013: What is the Head
#013 What is the Head concept
#012: Checking the changes of each file. git diff
#012 git diff
#011: switching Branches. git checkout name
#011 git checkout name
#010: what is a pull request
#010 what is a pull request concept
#009: creating a new Branch. git branch name
#009 git branch name
#008: interactively Adding files to commit. git add -p
#008 git add -p
#007: Checking the commits history. git log
#007 git log
#006: Checking the list of altered files. git status
#006 git status
#005: what is the staging area
#005 what is the staging area concept
#004: Checking the details of a commit. git show 09c6d68
#004 git show 09c6d68
#003: How to make a Commit. git commit -m 'changes'
#003 git commit -m 'changes'
#002: Adding files to a commit. git add file.txt
#002 git add file.txt
#001: Starting a project. git init
#001 git init