Repo to use for tutorial on how we are using git in ScholarSphere workflow
-
On your local computer cd into working directory (i.e. ~/workspace/ruby)
-
Clone repo onto local computer
git clone https://github.com/psu-stewardship/git-workflow-tutorial.git -
Change into working directory
cd git-workflow-tutorial -
Log into redmine and find an issue in the git-workflow-tutorial project that you have been assigned
-
In your local repo create a new branch for this issue
git branch GWT-<ticket-number> -
Use new branch
git checkout GWT-<ticket-number> -
Make changes to appropriate files to fix assigned issue
-
Run tests
-
Check to see what files have been updated
git status -
Stage changed or newly added files for commit
git add /path/to/file(s) -
Commit changes to local repository
git commit -m "my change is going to solve most things that were broken which is pretty 'sawsome fixes #<ticket-number>" -
Back to master branch
git checkout master -
Pull latest version of repo
git pull origin master -
Back to feature branch
git checkout GWT-<ticket-number> -
Rebase feature branch
git rebase master -
Back to master branch
git checkout master -
Merge changes from feature branch into master
git merge GWT-<ticket-number> -
Run tests
-
Update remote repo
git push