Skip to content

Instantly share code, notes, and snippets.

@iJKTen
Last active May 7, 2021 16:26
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
# Add everything to be commited
git add .
# Commit all the changes
git commit -m "message"
# Add everything and commit in one line
git commit -am "message"
# Create a new branch from main
git checkout -b branch-name
# Merge back to main
git checkout main
git merge branch-name
# Delete a branch
git branch -d branch-name
# Check the status of git
git status
# Check git log
git log
# If you need to make a change and have that change be present in the last commit and the repo is not pushed to public
# Make your change
git add .
git commit --amend --no-edit
# If you need to change a spelling mistake in your last commit
git commit --amend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment