-
Notifications
You must be signed in to change notification settings - Fork 20
Git Workflow
marcello edited this page Nov 27, 2014
·
3 revisions
Git is a source code version control system. It's biggest differential is: being distributed, fast and safe, as well as having an opitmized storage system.
On Linux Operating Systems it's necessary to install its package.
# aptitude install gitCreate a file named ~/.gitconfig on your home directory.
[user]
name = "Your Name"
email = email@domain
[alias]
st = status
co = checkout
ci = commit
br = branch -av
[pull]
rebase = true
[format]
pretty = oneline
abbrev-commit = true
[branch]
autosetuprebase = always
[push]
default = simple- Select an issue you want to work on if it's not already assigned
- Access the master branch
- Download the remote modifications to your local directory
- Create a new branch
- Do your task (modify/create/delete)
- Add modified files to send to origin
- Commit your solved task
- Pull remote modifications and merge them locally
- Push your modifications to origin
After you're done with your task:
- Rebase your branch with the remote master. How to Here
Create a pull-request and on description put a reference to which issue has been solved. Example: "Solve #13"
- Using github link.
After the pull-request has been created. Another dev will review and aprove the commit.
git clone https://github.com/cercomp/weby.git
git branch -av
or if you're using the mentioned aliases:
git br
git checkout <branch-name>
git checkout -b branch-name origin/remote-branch
We've determined the pattern of a branch name to be the like the following: "13_update_bootstrap"
git status
git add <file-name>
git commit -m "Put a summary of the modifications here."
git pull --rebase
To rebase your branch with the master follow the instructions on: Rebase branch with master
git push
git checkout <file-name>
git diff <file-name>
git remote update --prune