hwk github advanced My chamges - lahodyuk/hwk-github-advanced GitHub Wiki

STEP 1. Work with branch

  • create file Read Me in GitCMD for correct work
  • echo "

    GIT ADVANCED

    " > README.md
  • Check status and add test file
  • git status
  • git add .
  • Maked commit comment
  • git commit -m "created hwk git adwance README.md"
  • Sending file to git
  • git push origin master
  • Show all avaliable and active branch
  • git branch create new branch
  • git branch architecture Go to branch architecture
  • git checkout architecture
  • Show all avaliable and active branch
  • git branch CREATE FOLDER LIKE HWK
  • mkdir assets
  • mkdir uploads
  • echo "

    HOLLO GitHub!!!

    " > index.html Check all makups and add
  • git status
  • git add . Add comment to changes
  • git commit -m "add folder and file like in hwk " Got to folder assets and create 2 files (touch assets/css.js and css.js)
  • echo "test all.js" > all.js
  • echo "test css.js" > css.js Watch status, commit and add file to branch
  • cd ..
  • git status
  • git add .
  • git commit -m "add files all all.js and css.js in folder assets"
  • git push origin architecture Make ignor to folders UPLOADS
  • cd uploads
  • echo "/uploads/*" > .gitignore
  • git status
  • git add .
  • git commit -m "add file .gitignore"
  • git push origin architecture
  • git checkout master
  • git merge architecture
  • git checkout master Complit to merge and save changes
  • git push Delete archhotecture
  • git branch --delete architecture
  • git push origin master
  • git branch Persuaded only *master

STEP 2. Rebase

  • git branch rebaset
  • echo > rebasetest.txt
  • git status
  • git add .
  • git commit -m "add rebasetest.txt"
  • echo > rebasetest2.txt
  • git add .
  • git commit -m "add rebasetest2.txt"
  • git branch
  • git checkout rebaset
  • git rebase master
  • echo > rebasetest3.txt
  • git add .
  • git commit -m "Changes in file"
  • git merge master
  • git merge rebaset
  • git checkout master
  • git push
  • git branch -D rebaset

STEP 3. Tag

STEP 4. Submodule

STEP 5. Git Pages https://lahodyuk.github.io/hwk-github-advanced/

  • git branch gh-pages
  • git checkout gh-pages
  • git branch
  • echo "

    Hello world)

    " > index.html
  • git add .
  • git commit -m "add test file index.html"
  • git status
  • git push origin gh-pages

https://lahodyuk.github.io/hwk-github-advanced/index.html

  • echo "

    This is some changes

    " > index.html
  • git status
  • git add .
  • git commit -m "Add some changes"
  • git push origin gh-pages

all changes complit https://lahodyuk.github.io/hwk-github-advanced/

STEP 6. Conflict

  • echo "Add some changes in this file" > file.txt
  • git add .
  • git commit -m "add new file.txt"
  • git branch conflict
  • git checkout conflict
  • echo "get new changes if file for branch conflict" > file.txt
  • git add .
  • git commit -m "Change content in file.txt"
  • git checkout master
  • git merge conflict
  • git merge --abort
  • git merge conflict
  • git add .
  • git commit -m "resolved conflict"
  • git status
  • git push
⚠️ **GitHub.com Fallback** ⚠️