concerns much of the source code, it would be safer to work on the feature in a separate branch. $git branch Feature1022 –m “Comment” $git checkout Feature1022 $git branch Create a branch Switch to the branch Show available branches
merge the feature branch with the master branch $git checkout master $git merge Feature1022 $git branch -d Feature1022 Master branch Feature1022 Switch to the master branch Get rid of the feature branch
important. E.g. tag every stable version of the product before deploying. $git tag v1.1 –m “Comment” $git checkout tags/v1.1 $git tag $git tag –d v.1.1 $git push remote :refs/tags/v.1.1 Create a tag Switch to the tag Show available tags Remote tag in local repo Remote tag in remote repo
changes collected in the local repository to the remote one to share them with the team $cd /l/vhosts/os.htdocs/example $git push origin master Associated remote repo Branch
to the source code. This file can be sent to someone else and this person can use this file to apply the changes to his/her local $git checkout mybranch $git commit -am "First commit in the branch“ $git format-patch origin/master $git checkout master $git apply 0001-First-commit-in-the-branch.patch Creates 0001-First-commit-in-the- branch.patch
with following content: [alias] cd = checkout dir = branch ci = commit -a -m lg = log -p undo = reset –hard up = !git push origin master && git push origin --tags