Covers two common workflows for git -
- Multiple commits per branch (the "classic" workflow)
- A Single Commit per branch (with
amendandpush-force)
See also
| 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>
| Syntax | Description | Test Text |
|---|---|---|
| Header | Title | Here's this |
| Paragraph | Text | And more |