PDA

View Full Version : GitHub Creating pull requests



abu baniaz
17-12-18, 01:03
A guide I did for someone else on another project. Please feel free to submit corrections or enhancements.

This is the guide for the Web aspect of it. Most people who contribute use a Git client like Sourcetree.

abu baniaz
19-12-18, 01:36
To help keep your fork (copy of project) synchronised.....

Point 1A
If you have already made changes to dev and master branches in your fork and do not need the changes, delete the project from your GitHub account and start agian.


Point 1B
If you have already made changes to dev and master branches in your fork want to keep the changes,

On Sourcetree, rename the branches on your PC that you have already modified. Perhaps "dev/master_with_my_changes_ todays_date"

If you want to keep the changes because you have other changes, push the renamed master and dev branches to your GitHub account
Using Sourcetree, push/send the newly renamed branches to GitHub

On GitHub website delete the existing master/dev branches. (We are doing this because they have changes)

On sourcetree, click on upstream, origin, double click master/dev branches. You are now forking the the official (i.e without your changes) Vix master/dev branches back to your fork.
Push these branches to your GitHub account.

Create a new branch, merge the branches you had renamed earlier "dev/master_with_my_changes_ todays_date" into this new branch


Point 2
If you build your own images with changes that you make, do not build from the dev branch. Make a new branch from "dev", example "my_dev" and build from this new branch.

Sourcetree guide to follow

abu baniaz
19-12-18, 04:56
Sourcetree guide attached

Commandline guide


https://help.github.com/en/articles/syncing-a-fork


If you want the web based method, try this


https://github.com/KirstieJane/STEMMRoleModels/wiki/Syncing-your-fork-to-the-original-repository-via-the-browser


I could never do it from the browser. Hopefully someone who knows can post in another thread and I will add to this guide

abu baniaz
26-07-19, 17:56
I added this to my repositories



https://github.com/wei/pull#readme


Keeps master branch in forks in sync with upstream repositories

abu baniaz
21-10-19, 13:00
In order to list changes in a csv file, adapted from


https://stackoverflow.com/questions/10418056/how-do-i-generate-a-git-commit-log-for-the-last-month-and-export-it-as-csv


git log --before="2019-09-30" --pretty=format:'"%h","%an","%ae","%aD","%s",' --shortstat --no-merges | paste - - - > before_21090930_log.csv


git log --after="2017-12-31" --pretty=format:'"%h","%an","%ae","%aD","%s",' --shortstat --no-merges | paste - - - > after_21071231_log.csv