Git

De Casiopea
Git-logo.svg

Git es un software de control de versiones diseñado por Linus Torvalds. Más información en la página de Wikipedia.

Basic Stuff

Check which branch you’re working on git branch
Commit an update git commit -a -m 'Descriptive message'
Push an update (pull first) (git pull)
git push # Push the current branch
git push –all # Push all the branches
git push –tags # Push the tags

Creating new features

Create a feature branch from develop git checkout develop
git checkout -b feature-branch
Commit changes to the feature-branch git commit -a -m 'Descriptive message'
Merge the feature branch to develop git checkout develop
git merge –no-ff feature-branch develop
Delete the feature branch locally (optional) git branch -d feature-branch
Delete the remote feature branch (optional) git push origin –delete feature-branch

Creating a Release

Create a release branch from develop git checkout -b release-1.2.0 develop
Update the version number. git commit -a -m 'Update the version number to 1.2.0'
Merge the release branch to master git checkout master
git merge --no-ff release-1.2.0 master
Tag the master git tag -a v1.2.0
Merge the release into develop git checkout develop
git merge --no-ff release-1.2.0 develop
Publish the release git push --tags
git push
Delete the release branch git branch -D release-1.2.0