Git and SSH

Save your changes with a commit

Pick the files you changed and save them as one step in your project's history, with a short message.

Fill these in once
  1. See what changed
    Terminal
    git status
  2. Pick the files to save
    Terminal
    git add .

    The dot means every changed file in this folder. To pick one file, write its name instead.

  3. Save them with a message
    Terminal
    git commit -m "Fix the typo on the home page"

Check it worked

  1. See your latest commits
    Terminal
    git log --oneline -5
Undo it
  1. Undo the last commit but keep the changes
    Terminal
    git reset --soft HEAD~1

    Only do this before you've pushed the commit.

  1. See what changed
    Terminal · Ubuntu / Debian
    git status
  2. Pick the files to save
    Terminal · Ubuntu / Debian
    git add .

    The dot means every changed file in this folder. To pick one file, write its name instead.

  3. Save them with a message
    Terminal · Ubuntu / Debian
    git commit -m "Fix the typo on the home page"

Check it worked

  1. See your latest commits
    Terminal · Ubuntu / Debian
    git log --oneline -5
Undo it
  1. Undo the last commit but keep the changes
    Terminal · Ubuntu / Debian
    git reset --soft HEAD~1

    Only do this before you've pushed the commit.

  1. See what changed
    PowerShell
    git status
  2. Pick the files to save
    PowerShell
    git add .

    The dot means every changed file in this folder. To pick one file, write its name instead.

  3. Save them with a message
    PowerShell
    git commit -m "Fix the typo on the home page"

Check it worked

  1. See your latest commits
    PowerShell
    git log --oneline -5
Undo it
  1. Undo the last commit but keep the changes
    PowerShell
    git reset --soft HEAD~1

    Only do this before you've pushed the commit.

New to Commit? I explain it in plain English on Layman Terms.