Initialize Git
Initialize a local Git repository
git clone
Create a local copy of a remote repository
Git Status
Check current git status
Add File For Staging
Adds Single File For Staging
Add All Files For Staging
Stage All Changed Files
Commit Staged Files
git commit -m "[commit message]"
Commits the current staged files
Commit Staged Files
git commit -m "[commit message]"
Commits the current staged files
List Branches
List branches (the asterisk denotes the current branch)
Create New Branch
Create a new branch
Delete Branch
git branch -d [branch name]
Delete a branch
Delete Remote Branch
git push origin --delete [branchName]
Delete a remote branch
Create and Change To New branch
git checkout -b [branch name]
Create a new branch and switch to it
Clone And Switch To Remote Branch
git checkout -b [branch name] origin/[branch name]
Clone a remote branch and switch to it
Switch To branch
git checkout [branch name]
Switch to a branch by Name
Merge Branch Into Current Branch
Merge a branch into the active branch
Merge Branch Selected Branches
git merge [source branch] [target branch]
Merge a branch into a target branch
Stash All Current Changes
Delete changes in current branch back to last commit
Reset Head To Last Commit
Reset head to last commit
Reset Head To Two Commits Back
Reset head to two commits back
List Git Configurations
lists the git config file for current repo
List Global Git Configurations
git config --global --list
Lists the git config file for global current repo Settings
Push Current Branch Staged Files
Push changes to remote repository (remembered branch)
Push Branch To Remote Repo
git push origin [branch name]
Push a branch to your remote repository
Push Branch To Remote Repo
git push -u origin [branch name]
Push changes to remote repository (and remember the branch)
Delete Remote Branch
git push origin --delete [branch name]
Delete a remote branch
Update Local Repo
Update local repository to the newest commit
Update Local Repo By Branch Name
git pull origin [branch name]
Update local repository to the newest commit from remote branch
Fetch remote origin without merge
Gets remote origins most up to date commits without merging
rebases the current branch on the latest origin main
takes the current branch and changes the break off point at the latest origin main
Continue Git rebase
when in the middle of a rebase. this finishes off the rebase and confirms it.
Push Rebase To Remote
git push --force-with-lease origin HEAD
This Force pushes rebase to remote location without overwritting any work on that branch. will prevent if there is a commit in the way
Abort Rebase
This aborts the rebase process and returns the branch to its original state
Add Remote Repo To Local Project
git remote add origin ssh://git@github.com/[username]/[repository-name].git
Add a remote repository to local project
View Changes
View changes (detailed)