Git workflow

  1. git clone / git pull
  2. git checkout -b feature/name
  3. //codding
  4. git add -A
  5. git commit -m „added code to page.php”
  6. git checkout master
  7. git pull
  8. git checkout feature/name
  9. git rebase -i master
    1. edyor vi :wq
  10. git push / git push –set-upstream origin feature/name
  11. git Merge Request
    1. zatwierdzenie MR
  12. git checkout master
  13. git pull
  14. git checkout -b feature/name2
  15. //coding

 

zmiany w .gitignore

  1. git rm -r –cached .
  2. git add .
  3. git commit -m”Refresh git cache and gitignore”

konflikt z main.css przy checkout z master na feature/name

  1. git stash

konflikt przy rebase

  1. rozwiązanie konfliktów w edytorze
  2. git add -A
  3. git rebase –continue
  4. git rebase –abort // anulowanie

usunięcie wszystkich branch’ów poza master

  1. $git branch (grep -v „master” | xargs
  2. git branch -D