In short words, we are forking repository from Code for Poznan organisation to our repository, push the changes there and create pull requests from our branches (eg. w1stler:sample_branch
) to codeforpoznan:master
.
Link for reference: https://guides.github.com/introduction/flow/
- Fork repository from Code for Poznań
- Clone your (forked) repository to local computer
- Go to (
cd project_name
command) directory of cloned repository in a terminal - Add upstream remote by executing command
git remote add upstream https://github.com/CodeForPoznan/project_name.git
git status
- To make sure you are on master branch. If not:
git checkout master
to switch your current branch to master
git fetch upstream
- To fetch upstream repository (newest changes from master branch from upstream repository - in that case Code for Poznan's main branch for particular project)
git merge upstream/master
- To merge all the changes from upstream repository to your master branch.
git push
- to push all of the changes to forked repository
- create your own branch
git checkout -b name_of_your_branch
- make changes in the code
- add the changes
git add name_of_the_file
- commit the files
git commit -m "message that explains the commit"
- push the changes to your own repository
git push origin name_of_your_branch
- go to Github website and create Pull Request from head
eg.:
w1stler:sample_branch
to basecodeforpoznan:master