www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - [PRs] How to update on Github

reply "Chris" <wendlec tcd.ie> writes:
What's the easiest / safest way to update my own forks of D on 
github?
May 21 2015
parent reply "ZombineDev" <valid_email he.re> writes:
On Thursday, 21 May 2015 at 09:35:47 UTC, Chris wrote:
 What's the easiest / safest way to update my own forks of D on 
 github?
http://wiki.dlang.org/Pull_Requests
May 21 2015
parent reply "ZombineDev" <valid_email he.re> writes:
Basically you need clone your fork to your computer, add a 
"upstream" remote to github.com/D-Programming-Language/[repo 
name, eg. phobos], pull from upstream the new changes and 
optionally update github by pushing to origin (origin normally is 
github).
It may sound complicated doing this from the command-line, but 
after a few times you'll get used to it.
May 21 2015
next sibling parent reply Rikki Cattermole <alphaglosined gmail.com> writes:
On 21/05/2015 10:39 p.m., ZombineDev wrote:
 Basically you need clone your fork to your computer, add a "upstream"
 remote to github.com/D-Programming-Language/[repo name, eg. phobos],
 pull from upstream the new changes and optionally update github by
 pushing to origin (origin normally is github).
 It may sound complicated doing this from the command-line, but after a
 few times you'll get used to it.
Or for Windows/OSX you can use SourceTree. It is amaaaaaaaaaaaaazing! https://www.sourcetreeapp.com/
May 21 2015
next sibling parent reply "Baz" <bb.temp gmx.com> writes:
On Thursday, 21 May 2015 at 10:42:34 UTC, Rikki Cattermole wrote:
 On 21/05/2015 10:39 p.m., ZombineDev wrote:
 Basically you need clone your fork to your computer, add a 
 "upstream"
 remote to github.com/D-Programming-Language/[repo name, eg. 
 phobos],
 pull from upstream the new changes and optionally update 
 github by
 pushing to origin (origin normally is github).
 It may sound complicated doing this from the command-line, but 
 after a
 few times you'll get used to it.
Or for Windows/OSX you can use SourceTree. It is amaaaaaaaaaaaaazing! https://www.sourcetreeapp.com/
i'm a bit less enthusiast than you about this soft even if i use to be: + easy commits: push/pull/commit + easy branches: switch/create/delete + easy remotes: manage different sources (e.g official & your forks) - more complex things, squash, rebase, still have to use the console. - big repositories are slow to open/refresh/switch branch - several times ST has completly ruined my local repositories. - it's a nightmare with any repos based on many sub repositories. - it doesn't use *libgit*, but *git* executable itself, and it doesn't seem to balance well multiple instances among the cores. Still the best git GUI but it has some obvious problems and bugs.
May 21 2015
next sibling parent reply Rikki Cattermole <alphaglosined gmail.com> writes:
On 22/05/2015 1:30 a.m., Baz wrote:
 On Thursday, 21 May 2015 at 10:42:34 UTC, Rikki Cattermole wrote:
 On 21/05/2015 10:39 p.m., ZombineDev wrote:
 Basically you need clone your fork to your computer, add a "upstream"
 remote to github.com/D-Programming-Language/[repo name, eg. phobos],
 pull from upstream the new changes and optionally update github by
 pushing to origin (origin normally is github).
 It may sound complicated doing this from the command-line, but after a
 few times you'll get used to it.
Or for Windows/OSX you can use SourceTree. It is amaaaaaaaaaaaaazing! https://www.sourcetreeapp.com/
i'm a bit less enthusiast than you about this soft even if i use to be: + easy commits: push/pull/commit + easy branches: switch/create/delete + easy remotes: manage different sources (e.g official & your forks) - more complex things, squash, rebase, still have to use the console. - big repositories are slow to open/refresh/switch branch - several times ST has completly ruined my local repositories. - it's a nightmare with any repos based on many sub repositories. - it doesn't use *libgit*, but *git* executable itself, and it doesn't seem to balance well multiple instances among the cores. Still the best git GUI but it has some obvious problems and bugs.
IMO making a good UI for VC is hard. As you said even SourceTree isn't perfect. If only somebody could make a better cross platform one.
May 21 2015
next sibling parent "Chris" <wendlec tcd.ie> writes:
On Thursday, 21 May 2015 at 13:40:22 UTC, Rikki Cattermole wrote:
 IMO making a good UI for VC is hard. As you said even 
 SourceTree isn't perfect.

 If only somebody could make a better cross platform one.
Go ahead, write on in D ;)
May 21 2015
prev sibling parent Basile B. <b2.temp gmx.com> writes:
On Thursday, 21 May 2015 at 13:40:22 UTC, Rikki Cattermole wrote:
 On 22/05/2015 1:30 a.m., Baz wrote:
 Still the best git GUI but it has some obvious problems and 
 bugs.
IMO making a good UI for VC is hard. As you said even SourceTree isn't perfect. If only somebody could make a better cross platform one.
OMFG It's there !! https://www.gitkraken.com/ Almost all what I could reproach to SourceTree is fine in Kraken !! And it's truely cross-platform. The only thing I have'nt tested yet is rebasing but most of the time I'll only need to ammend previous commit, anyway so far for me Kraken is a bit over ST.
Apr 18 2016
prev sibling parent "extrawurst" <stephan extrawurst.org> writes:
On Thursday, 21 May 2015 at 13:30:49 UTC, Baz wrote:
 On Thursday, 21 May 2015 at 10:42:34 UTC, Rikki Cattermole 
 wrote:
 On 21/05/2015 10:39 p.m., ZombineDev wrote:
 Basically you need clone your fork to your computer, add a 
 "upstream"
 remote to github.com/D-Programming-Language/[repo name, eg. 
 phobos],
 pull from upstream the new changes and optionally update 
 github by
 pushing to origin (origin normally is github).
 It may sound complicated doing this from the command-line, 
 but after a
 few times you'll get used to it.
Or for Windows/OSX you can use SourceTree. It is amaaaaaaaaaaaaazing! https://www.sourcetreeapp.com/
i'm a bit less enthusiast than you about this soft even if i use to be: + easy commits: push/pull/commit + easy branches: switch/create/delete + easy remotes: manage different sources (e.g official & your forks) - more complex things, squash, rebase, still have to use the console. - big repositories are slow to open/refresh/switch branch - several times ST has completly ruined my local repositories. - it's a nightmare with any repos based on many sub repositories. - it doesn't use *libgit*, but *git* executable itself, and it doesn't seem to balance well multiple instances among the cores. Still the best git GUI but it has some obvious problems and bugs.
replied b4 reading this.. so +1
May 21 2015
prev sibling parent "extrawurst" <stephan extrawurst.org> writes:
On Thursday, 21 May 2015 at 10:42:34 UTC, Rikki Cattermole wrote:
 On 21/05/2015 10:39 p.m., ZombineDev wrote:
 Basically you need clone your fork to your computer, add a 
 "upstream"
 remote to github.com/D-Programming-Language/[repo name, eg. 
 phobos],
 pull from upstream the new changes and optionally update 
 github by
 pushing to origin (origin normally is github).
 It may sound complicated doing this from the command-line, but 
 after a
 few times you'll get used to it.
Or for Windows/OSX you can use SourceTree. It is amaaaaaaaaaaaaazing! https://www.sourcetreeapp.com/
yup and amazingly unstable and slow on windows too, yaay
May 21 2015
prev sibling next sibling parent reply "Chris" <wendlec tcd.ie> writes:
On Thursday, 21 May 2015 at 10:39:46 UTC, ZombineDev wrote:
 Basically you need clone your fork to your computer, add a 
 "upstream" remote to github.com/D-Programming-Language/[repo 
 name, eg. phobos], pull from upstream the new changes and 
 optionally update github by pushing to origin (origin normally 
 is github).
 It may sound complicated doing this from the command-line, but 
 after a few times you'll get used to it.
Yes, I've done all this and it seems to work (it says "Able to merge. These branches can be automatically merged."), but still I bet the info "This branch is 2 commits ahead, 13 commits behind D-Programming-Language:master" Weird.
May 21 2015
parent reply Steven Schveighoffer <schveiguy yahoo.com> writes:
On 5/21/15 7:29 AM, Chris wrote:
 On Thursday, 21 May 2015 at 10:39:46 UTC, ZombineDev wrote:
 Basically you need clone your fork to your computer, add a "upstream"
 remote to github.com/D-Programming-Language/[repo name, eg. phobos],
 pull from upstream the new changes and optionally update github by
 pushing to origin (origin normally is github).
 It may sound complicated doing this from the command-line, but after a
 few times you'll get used to it.
Yes, I've done all this and it seems to work (it says "Able to merge. These branches can be automatically merged."), but still I bet the info "This branch is 2 commits ahead, 13 commits behind D-Programming-Language:master"
Don't worry about that. What it's saying is that 13 commits have occurred on D master since you forked from master, and you have added 2 commits in your local repository that master doesn't have. It's just basically saying the length of each of the prongs in the fork. The fact that you can automatically merge simply means that you haven't committed anything that would conflict with those other 13 commits. It's all normal :) Once you add the pull request, the auto tester will test the version that merges both. You don't have to do that yourself (unless you want to be pedantic). If every PR had to keep up with all other merges, we'd be spending so much more overhead on merging. This is the beauty of git/distributed source control over classic forms such as CVS or subversion. -Steve
May 21 2015
parent "Chris" <wendlec tcd.ie> writes:
On Thursday, 21 May 2015 at 13:34:53 UTC, Steven Schveighoffer 
wrote:
 On 5/21/15 7:29 AM, Chris wrote:
 On Thursday, 21 May 2015 at 10:39:46 UTC, ZombineDev wrote:
 Basically you need clone your fork to your computer, add a 
 "upstream"
 remote to github.com/D-Programming-Language/[repo name, eg. 
 phobos],
 pull from upstream the new changes and optionally update 
 github by
 pushing to origin (origin normally is github).
 It may sound complicated doing this from the command-line, 
 but after a
 few times you'll get used to it.
Yes, I've done all this and it seems to work (it says "Able to merge. These branches can be automatically merged."), but still I bet the info "This branch is 2 commits ahead, 13 commits behind D-Programming-Language:master"
Don't worry about that. What it's saying is that 13 commits have occurred on D master since you forked from master, and you have added 2 commits in your local repository that master doesn't have. It's just basically saying the length of each of the prongs in the fork. The fact that you can automatically merge simply means that you haven't committed anything that would conflict with those other 13 commits. It's all normal :) Once you add the pull request, the auto tester will test the version that merges both. You don't have to do that yourself (unless you want to be pedantic). If every PR had to keep up with all other merges, we'd be spending so much more overhead on merging. This is the beauty of git/distributed source control over classic forms such as CVS or subversion. -Steve
Ok, cool.
May 21 2015
prev sibling parent reply tcak <1ltkrs+3wyh1ow7kzn1k sharklasers.com> writes:
On Thursday, 21 May 2015 at 10:39:46 UTC, ZombineDev wrote:
 Basically you need clone your fork to your computer, add a 
 "upstream" remote to github.com/D-Programming-Language/[repo 
 name, eg. phobos], pull from upstream the new changes and 
 optionally update github by pushing to origin (origin normally 
 is github).
 It may sound complicated doing this from the command-line, but 
 after a few times you'll get used to it.
Please put this information somewhere. Due to the fear of being told to squash commits, I do not want to do any commits anymore.
Apr 19 2016
next sibling parent reply John Colvin <john.loughran.colvin gmail.com> writes:
On Tuesday, 19 April 2016 at 13:05:35 UTC, tcak wrote:
 On Thursday, 21 May 2015 at 10:39:46 UTC, ZombineDev wrote:
 Basically you need clone your fork to your computer, add a 
 "upstream" remote to github.com/D-Programming-Language/[repo 
 name, eg. phobos], pull from upstream the new changes and 
 optionally update github by pushing to origin (origin normally 
 is github).
 It may sound complicated doing this from the command-line, but 
 after a few times you'll get used to it.
Please put this information somewhere. Due to the fear of being told to squash commits, I do not want to do any commits anymore.
If all you need to do is squash commits, just `git rebase -i HEAD~N` where N is some number at least as big as the number of commits back that you're interested in messing around with then read the instructions that will appear. Once you're done, `git push --force` to update your branch. I would recommend making a copy of the whole repository locally before any of that just in case you mess something up, at least while you're not as confident with git.
Apr 19 2016
parent Nick Treleaven <ntrel-pub mybtinternet.com> writes:
On Tuesday, 19 April 2016 at 13:34:24 UTC, John Colvin wrote:
 On Tuesday, 19 April 2016 at 13:05:35 UTC, tcak wrote:

 I would recommend making a copy of the whole repository locally 
 before any of that just in case you mess something up, at least 
 while you're not as confident with git.
Isn't it enough to just: git branch before-rebase (You can also add -f to replace an existing backup branch).
Apr 21 2016
prev sibling next sibling parent Daniel Murphy <yebbliesnospam gmail.com> writes:
On 19/04/2016 11:05 PM, tcak wrote:
 On Thursday, 21 May 2015 at 10:39:46 UTC, ZombineDev wrote:
 Basically you need clone your fork to your computer, add a "upstream"
 remote to github.com/D-Programming-Language/[repo name, eg. phobos],
 pull from upstream the new changes and optionally update github by
 pushing to origin (origin normally is github).
 It may sound complicated doing this from the command-line, but after a
 few times you'll get used to it.
Please put this information somewhere. Due to the fear of being told to squash commits, I do not want to do any commits anymore.
It's in the wiki.
Apr 19 2016
prev sibling parent ZombineDev <petar.p.kirov gmail.com> writes:
On Tuesday, 19 April 2016 at 13:05:35 UTC, tcak wrote:
 On Thursday, 21 May 2015 at 10:39:46 UTC, ZombineDev wrote:
 Basically you need clone your fork to your computer, add a 
 "upstream" remote to github.com/D-Programming-Language/[repo 
 name, eg. phobos], pull from upstream the new changes and 
 optionally update github by pushing to origin (origin normally 
 is github).
 It may sound complicated doing this from the command-line, but 
 after a few times you'll get used to it.
Please put this information somewhere.
Is the information written here (http://wiki.dlang.org/Starting_as_a_Contributor) helpful?
 Due to the fear of being told to squash commits, I do not want 
 to do any commits anymore.
There's no need to worry. I'm sure all of the contributors would be happy to help you if you run into problems.
Apr 19 2016