Skip to content

Instantly share code, notes, and snippets.

@raitisd
Last active August 10, 2018 09:23
Show Gist options
  • Save raitisd/b6b1e09e9c584d433c2d6d712c5368ac to your computer and use it in GitHub Desktop.
Save raitisd/b6b1e09e9c584d433c2d6d712c5368ac to your computer and use it in GitHub Desktop.
Git basics for lil schatzii

Git basics for lil schatzii

When you start working make sure you are on the main branch (master or develop).

git checkout master

Make sure your main branch is up to date.

git pull

Create a new branch you will work in.

git checkout -b your-branch

Do some changes. After changing what you need check that nothing unexpected is being commited.

git diff

Stage changes for commit.

git add .

Commit changes.

git commit -m "message explaining what you changed"

Push changes to a new remote branch.

git push -u origin your-branch

You can push more changes to the same branch later with just git push.

git push
@AnniSan
Copy link

AnniSan commented Aug 10, 2018

can we add: git commit -m "message explaining what you changed" --amend

:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment