Skip to content

Latest commit

 

History

History
86 lines (45 loc) · 1.65 KB

File metadata and controls

86 lines (45 loc) · 1.65 KB

git Workflows - Cheat-Sheet (WIP)

Table of Contents

 

Overview

Covers two common workflows for git -

  • Multiple commits per branch (the "classic" workflow)
  • A Single Commit per branch (with amend and push-force)

See also

Common Steps

Step Aliases or other Tools Command in Terminal or Git-Bash Comments
(Clone the Repo.) git clone <URL_FROM_GITLAB>
Create New Branch
and Switch to it
git fetch (--prune)
git switch -c <NEW_BRANCH> origin/<BASE_BRANCH>
To create the branch via GitLab UI,
see the full Workflow

Create Initial Commit

Use a Git-Client

(don't use the IDE)

git status
git diff
git add <FILE>
git commit -m "<COMMIT_MESSAGE>"

DO NOT USE:

git add *
git add .

(I will slap you) Push Initial Commit to Remote Branch

git push

OR:

git push -u origin <NEW_BRANCH>

Specific Steps

Multi-Commit Workflow

Single-Commit Workflow

Other Related Actions

Syntax Description Test Text
Header Title Here's this
Paragraph Text And more