Uživatel:Josmart/GIT
From WikiSkripta
- Create a new branch (rovnou do ni přejdu)
git checkout -b feature_branch_name #Edit, add and commit your files.
- Push your branch to the remote repository
git push --set-upstream origin branch_name, nebo shortcut: git push -u origin branch_name
Nahrát změny z masteru do větve
git checkout <name of branch> git merge master git push
MERGE větev do masteru
git checkout master git pull origin master git merge dev git push origin master
Aktualizace už stažené repository, pokud git pull hodí chybu
git stash git pull
Odstranit soubor
git rm
Zrušit poslední git add
git reset
Rename branch
git branch -m old_branch new_branch # Rename branch locally git push origin :old_branch # Delete the old branch git checkout new_branch git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote