Skip to content

Latest commit

 

History

History
46 lines (34 loc) · 1006 Bytes

git-guide.md

File metadata and controls

46 lines (34 loc) · 1006 Bytes

Git Quick Reference Guide

💡 To clone you may need to set up SSH keys in your account.

ssh-keygen -t ed25519 -C "[email protected]"

🔷 First time cloning and new branch:

  1. Git workflow:

    git clone PROJECT.git
    git checkout -b NEWBRANCH
    
    # make changes
    
    git status
    git add -A
    git commit -m "commit message"
    git push -u origin NEWBRANCH

    ⚠️ Never use the --force flag!

  2. Create Merge Request


🔷 If you already have the repo cloned, and branch already exists:

  1. Git workflow:

    git checkout master
    git pull
    git checkout BRANCHNAME
    git merge master
    
    # make changes
    
    git status
    git add -A
    git commit -m "commit message"
    git push

    ⚠️ Never use the --force flag!

  2. Create Merge Request