purplecat: Programming the Eniac Computer (programming)
[personal profile] purplecat
I'm about to push my latest bug fix to github. While I've been working on this bug there's been some changes to the main develop branch so, obviously, I want to merge these into my branch before I push my code and submit a pull request.

Now I recall that in the past I've been asked to clean up the log after doing this but I've forgotten the process for achieving that. If someone could post an idiots' guide in the comments that would be really useful!
kaberett: Overlaid Mars & Venus symbols, with Swiss Army knife tools at other positions around the central circle. (Default)
[personal profile] kaberett
So! Today I noticed that github, on your profile page, tells you your "longest coding streak" (consecutive days with commits, I think) and your "current coding streak". This metric is an incredible way to give me anxiety attacks and impostor syndrome; [personal profile] sophie very kindly coded up a Greasemonkey script that removes these panels (on all viewed profiles). On the grounds that I can't be the only person with this particular Issue... have at it. :-) (Shared with Sophie's permission!)
kaberett: Overlaid Mars & Venus symbols, with Swiss Army knife tools at other positions around the central circle. (Default)
[personal profile] kaberett
I have just pushed what is hopefully the final version of my patch for Bug 5030.

As you can see from comments on that git page, it took quite a lot of editing for me to get it to the final point. This means I ended up running git commit several times (here's the handy wiki doc).

For tidiness' sake, [personal profile] fu wanted all of the commits in that branch merged into a single commit using git rebase.

So, because I ended up doing this several times (and forgetting in between times how I'd done it), here is Wot I Did:
Read more... )

That is a thing that I did! And explained really badly. But at least now there is outline for asking further questions/putting it in the wiki?
kaberett: Overlaid Mars & Venus symbols, with Swiss Army knife tools at other positions around the central circle. (Default)
[personal profile] kaberett
Wiki page on Version Control.

Tonight I logged into my Dreamhack for the first time since September (there were over 700 commits that I was behind by, um), and [personal profile] randomling was an absolute sweetheart and held my hand through the process of (a) updating my Dreamhack and (b) submitting my first patch since, er, we migrated.

(... whereupon I promptly forgot everything I ever knew about updating language strings, and mark was very sweet about it...)

IN THE PROCESS, I ended up tweaking the wiki page a bit, to include things I ran up against and needed to check with other people.

What else would you like to see in there? Leave suggestions in comments and we can edit them in!
ninetydegrees: Drawing: girl peeking through blinds (peeking)
[personal profile] ninetydegrees
A while ago, Denise mentioned Michael Schwern's awesome 'Git For Ages 4 And Up' talk. So far you could only see the 2010 OSCON vid of it but there's a new one from 2013 linux.conf.au: http://youtu.be/1ffBJ4sVUb4. If you've already seen the 2010 vid you'll see that Michael Schwern has perfected his talk over the years and it's easier and clearer to understand now -- at least for the basics. The vid is also better quality so if you need a refresher or a link for fellow volunteers or co-workers this might be a good one. :)
ninetydegrees: Drawing: a woman, afraid and crying, comic style (tear)
[personal profile] ninetydegrees
Could someone please explain this entry in simpler terms, preferably with detailed steps? I just don't get it because I have no release branch not stemming from develop so I'm not sure how I should go about creating it (the command given in the entry doesn't work for me obviously as branches on hack are only develop and master).
[personal profile] swaldman

- I worked on bug A and submitted a pull request. That hasn't yet been accepted.
- I want to work on bug B, which expands upon A and changes the same bits of code.
- Since A has not yet been accepted, its changes are not yet in the develop branch. However, I still have A's branch available to me.

Is there a way in which I can base B on A and (assuming that A is accepted without changes) have it all merge nicely in the end? Or do I need to wait for A to be merged into develop first?

Also, if there is a way, is there going to be a big problem if A then *isn't* accepted / requires changes / whatever?

Thanks :-)
yvi: Kaylee half-smiling, looking very pretty (Default)
[personal profile] yvi
So I managed to submit my first pull request \o/

However, i have the following problem, bets described in console output:

dh-yvi@newhack:~/dw$ git checkout develop
Switched to branch 'develop'
Your branch is ahead of 'dreamwidth/develop' by 68 commits.
dh-yvi@newhack:~/dw$ git checkout master
Switched to branch 'master'
Your branch is ahead of 'dreamwidth/master' by 200 commits.

dh-yvi@newhack:~/dw$ git pull dreamwidth develop:develop
Already up-to-date.
dh-yvi@newhack:~/dw$ git pull dreamwidth master:master
From https://github.com/dreamwidth/dw-free
! [rejected] master -> master (non-fast-forward)
dh-yvi@newhack:~/dw$ git push origin develop
Everything up-to-date
dh-yvi@newhack:~/dw$ git push origin master
Everything up-to-date

What's going on there?
ninetydegrees: Photo: an octopus's tentacles (tentacles)
[personal profile] ninetydegrees
Once your request has been pulled into develop and you've updated develop what do you do with your 'old' branch (local and remote)?

Read more... )

Answer 1: local can be deleted w/ git branch -d BRANCHNAME (not merge needed yay)

Answer 2: remote can be deleted using git push origin :BRANCHNAME
ninetydegrees: Drawing: a girl's face, with a yellow and green stripe over one eye (Default)
[personal profile] ninetydegrees
1) If you're working on bug A on branch A then want to work on completely unrelated bug B on branch B, do you need to stash you changes on A checkout develop then create branch B?

Answer: yes, but see comments about using git commit and git commit --amend in your workflow.

2) When can you use git diff? Before add only? Because otherwise it gives me nothing and I have to use git status -v.

Answer: possibly with git diff --cached or git diff HEAD^ HEAD (untested)

3) Oh I feel so stupid for asking this but how do you get out of git diff or git log on PuTTY? Ctrl+C and Ctrl+X don't work.

Answer: the magic key is 'q' and this is related to PAGER and not PuTTY

4) If you're working on bug A on branch A and have reached a point where you want to do some more work but be easily able to revert to where you were before, what is the best route? Several commits? Creating a subbranch A1 (is that possible?)? Is that where merge is useful? I'm having the hardest time understanding how merge can be used concretely.

Answer: several commits is indeed the best route; the concept of 'subbranches' isn't valid.

5) In git config, is there a way to reset the value of core.editor to whatever is the default on your computer (without naming the editor)?

Answer: yes, with git config --global --unset core.editor
kimira: (Default)
[personal profile] kimira
Hi, I haven't done much with my dreamhack in a while, but the recent post made me want to try moving it to github. Only I've become stuck at the very beginning of the process. The wiki page linked me to a page about github which linked me to a crach course on git (as I haven't used it before), and this linked me eventually to a place to download git for my OS (windows) but there are two versions there ("Git for Windows" and "msysGit") and I don't know which one I'm supposed to use.
ninetydegrees: Photo: bingo chips (bingo)
[personal profile] ninetydegrees
How does one update their repos on their hack now? The 'old' script no longer pulls anything for me (what used to be on http://wiki.dwscoalition.org/wiki/index.php/Dev_Maintenance) and I don't understand how I can keep up with changes. :/

(Context: I'm on Windows; I use PuTTY and WinSCP).

Edit: ok, if anybody else wonders, short answer is you can no longer update your hack using old methods. :/

Edit 2: long answer is you can switch to the new system. See comments for detailed instructions. :)


dw_dev_training: The stylised 'd', with the word 'dev' above, and the word 'training' at the side, representing the dw_dev_training comm. (Default)
Dreamwidth Development Training

January 2017

151617 18192021


RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Oct. 20th, 2017 10:42 am
Powered by Dreamwidth Studios