-
Notifications
You must be signed in to change notification settings - Fork 23
Github Workflow Cheat Sheet
Here are some common tasks in git/github. See also Configuring SSH Access to Github and the Git Tutorial.
Wondering how to use git/GitHub effectively with easydata?
Here's our suggestion for a reliable git workflow.
First, we strongly recommend work from your own fork. Instructions for doing this are included in the README that shipped with your easydata-based repo.
Next, you should configure your git remotes so that origin refers to your personal github fork, and upstream refers to the source repo. Again, the README tells you how.
To make life easiest, use your master branch only for tracking changes in the upstream repo, and do all your development work in branches. This combination makes it much easier not only to stay up to date with changes the project repo, but also makes it easier to submit Pull Requests (PRs) against the upstream project repo should you want to contribute.
We suggest you start each day by doing this:
git branch
git status
git add -p # accept or reject parts of the patch
git commit -m "your commit message here"Did you do work on your branch, but on a different machine? Make sure your local branch is up-to-date with your fork:
git checkout master
git fetch origin --prune
git merge origin/masterNext, check if the upstream repo has been updated:
git checkout master
git fetch upstream --prune
git merge upstream/master
git push origin master
make update_environmentNow that your master is up-to-date, you should use it to update your working branches. If you are already developing in a branch called, e.g. my_branch, do this before writing any more code:
git checkout my_branch
git merge master
git push origin my_branchCreate a clean working branch by doing a:
git checkout master
git checkout -b new_branch_nameFinally, clean up any of your old branches that are fully merged.
git branch --merged master
git branch -d {name_of_merged_branch}This should be enough to get you going!