Skip to content
This repository has been archived by the owner on Sep 29, 2021. It is now read-only.

Useful Git Commands

Kelly Holtzman edited this page Jan 15, 2021 · 2 revisions

These are git commands that could be useful for working from this repository, however, you're free use any software or workflow you like to push changes, create PRs, address requested changes, fix merge conflicts, etc. as long as your PR is approved and GitHub Actions pass.

For additional git commands, try starting reading from here.


Useful git commands with description

git pull <remote name> <branch name> - Will fetch and try to merge changes from a remote branch of the same name as the local branch into the local branch.

git add <file name> - Will try to stage a changed file for commit. Can use git add . to grab all unstaged files.

git push <remote name> <local branch name> - Will try to push changes of the local branch to a remote branch of the same name, or create a new remote branch with the same name.

git commit - Will commit the staged changes. Will open an editor (usually vim) for you to add the commit message. If you're committing with just a one-line message, use git commit -m "<your message>" (use the quotes).

git commit --amend - Will amend the last commit with staged changes, if any. You can modify just the commit message this way as well by using the command with no staged changes.

git push <remote name> +<local branch name> - Will absolutely push changes of the local branch to a remote branch of the same name, or create a new remote branch with the same name. If the local and remote branches differ, the local branch will overwrite the remote branch.

git rebase <branch name> - Will rebase the commits of the current local branch atop the commits of the specified branch. Could combine with git rebase <remote name> <branch name>.

git rebase -i <commit hash> - Will rebase the local branch onto the commit hash, allowing for squashes, dropping, rewording, etc. of commits.

git log - Will display the git commits for the local branch. Will show where other branch history may be, like that of master, if the branch is also on the local machine.

git branch - Will display all local branches.

git checkout <branch name> - Will try to switch to a local branch of the given name.

git checkout -b <branch name> - Will checkout a new branch that is a copy of the local branch the command is executed in.

git reflog - Will display all executed git commands, with associated hashes, since the repository was checked out.

git branch -D <local branch name> - Will delete the local branch. You must not have the branch checked out to delete it (meaning, switch to another branch because you can't delete the one you're currently on)

git remote -v - Will display the remote repository addresses. Useful if you forgot the name of your remote.

Deliverables pages (see website)

Client meeting minutes pages:

  1. Progress Update and Project Requirement Questions Oct 5, 2020
  2. Progress Update Meeting Oct 29, 2020
  3. Progress Update Meeting and USM-related questions Nov 11, 2020
  4. Mentor Progress Update Meeting Nov 25, 2020
  5. Livestock Services Saskatchewan Project Meeting Dec 3, 2020
  6. Team and Instructor, Mentor, and Faculty Meeting Minutes

Team meeting minutes pages:

  1. Sprint 0
  2. Sprint 1
  3. Sprint 1 Retrospective
  4. Sprint 2
  5. Sprint 2 Retrospective
  6. Sprint 3
  7. Sprint 3 Retrospective
  8. Sprint 4
  9. Sprint 4 Retrospective
  10. Sprint 5
  11. Sprint 5 Retrospective
  12. Sprint 6
  13. Sprint 6 Retrospective
  14. Sprint 7
  15. Sprint 8
  16. Sprint 7/8 Retrospective
  17. Sprint 9
  18. Sprint 10

Requirements-related pages:

  1. About Project Charter
  2. About Project Requirements

Specification-related pages:

  1. Animal Record Transport Template Breakdown
  2. Transfer of Care Document Breakdown
  3. FWR Document Breakdown
  4. Contingency Plan Breakdown

User Story Mapping-related pages:

  1. User Story Mapping Guide

Design-related pages:

  1. C4-Model for Client-Server Architecture
  2. Data Modelling Design Process
  3. Guide to GUI Prototyping Structure

System Test Procedure pages:

  1. Animal Transport Record-related Test Cases
  2. Transporter Account-related Test Cases
  3. System Settings-related Test Cases

Investigation pages:

  1. Adobe XD vs Figma
  2. Client-Server Architecture Tools
  3. Firebase vs. AWS Amplify

Project Setup/FAQ pages:

  1. Cloning Humane Transport
  2. Set up Pre-Commit
  3. IDE Useful Settings
  4. Testing Workflow
  5. Useful Git Commands
  6. Must Know Flutter Concepts
Clone this wiki locally