PDA

View Full Version : Git



TimTim
10-31-2015, 11:04 PM
GitHub
WOO COME ON!!!!!

SAM
11-01-2015, 07:25 AM
What's the purpose of github as opposed to say media fire or Dropbox?

TimTim
11-01-2015, 03:03 PM
What's the purpose of github as opposed to say media fire or Dropbox?
Git (not just GitHub) is designed for collaborative software development. There's all kinds of stuff like:
- Commit (change) history
- Branches (create a branch to work on a feature and if it's good, you can merge it instantly into the master branch (main code) when you're done; you and multiple people can of course work on multiple branches at the same time without interfering with each other and it's super easy to merge everything later)
- Diffs and comparison (you can see exactly (line-by-line) what's changed between commits and/or branches)
- Pull requests (other devs can implement a feature and request for it to be merged into the master branch, and from there it's typically just a single click to merge)
- GitHub has a really nice issues API that makes it easy to reference other issues, pull requests, and users and automatically close issues when they're resolved

There's probably some other good stuff I'm forgetting but you get the idea. :)

TimTim
11-01-2015, 03:14 PM
A few examples for the above points:
- Commit history: https://github.com/CacoFFF/SiegeIV-UT99/commits/master
- Review all the changes within a specific commit: https://github.com/CacoFFF/SiegeIV-UT99/commit/72bb72599348d5f01585b7f517901b4ec6499778
- Link to specific lines of code within a certain commit: https://github.com/CacoFFF/SiegeIV-UT99/blob/72bb72599348d5f01585b7f517901b4ec6499778/Classes/sgEquipmentSupplier.uc#L49-L59
- View commit history for a single file: https://github.com/CacoFFF/SiegeIV-UT99/commits/cacustest/Classes/sgEquipmentSupplier.uc
- View a pull request (in this particular case, it's a branch) which of course includes the commits within it: https://github.com/CacoFFF/SiegeIV-UT99/pull/1
- I just created an issue on the repo, check it! https://github.com/CacoFFF/SiegeIV-UT99/issues/2

TimTim
11-01-2015, 04:57 PM
Moved posts out of locked thread to this one.

seabass
11-01-2015, 06:18 PM
Very relevant to my first ~2 years of using git

http://imgs.xkcd.com/comics/git.png

I remember the first time I tried using a SCM system at my uni for extra geek points. I was using Mercurial at the time (I was told it had a more sane interface than git), and right before an assignment deadline, I accidentally something, and I couldn't figure out how to get back to my last commit.
That's got to be like one of the top 5 worst feelings in the world. One minute, you've got everything under control and after several days of work, the project is coming together, and then with one command, everything just goes to shit.
I was considering just delivering my .hg folder (where Mercurial stores everything) and hope that the TA that would be grading it would be familiar enough with it to recover the work. Luckily, I got some help from a friend who happened to drop by the classroom who was familiar with it, and he was able to figure out how to get everything back.

Lesson learned: do not mess around with unfamiliar technology when doing important work.

TimTim
11-01-2015, 06:24 PM
The `git log` command is your friend. :D

As long as files are physically on your drive in the `.git` directory, even if you accidentally rollback (for example) or something, you can still retrieve (e.g., `git cherrypick`) "future" commits and rebase everything. There are a ton of really useful (albeit obscure) commands, but yeah I only use a few on a regular basis plus a few more for rebasing/merging others' work.

Scourge
11-03-2015, 04:17 PM
Teach me UnrealScript and I'll fork the crap out of Siege.

Chamberly
11-04-2015, 12:24 AM
Sigh. Maybe I'll go find uscript tutorials and post it all on 1 page.

.seVered.][
11-06-2015, 02:20 AM
What's the purpose of github as opposed to say media fire or Dropbox?
OMG, that is the straaaangest comparison of opposition I have seen in some time... (no offense).. but Git is the..it! (explicative parsed)

I would post a detailed discussion of it, but it seems TimTim has already got well into that. My favorite part of Git .. well all of it... and Version control.

Chamberly
11-27-2015, 09:10 PM
Got it now. lol.. congrat to myself.

https://i.gyazo.com/19f2f93affb09abaebf6cabaa02c6ec0.png

Yeah... I like doing stuff like this. xP

UT-Sniper-SJA94
11-27-2015, 11:22 PM
Lol, I really should start using git, it will be much faster then the process I do with my projects.

SAM
01-02-2016, 03:37 PM
I'm tempted to use it now for my next dev....whatever that might be?

seabass
01-02-2016, 03:48 PM
There's a free book available on the official GIT homepage. I've been using it, and I it's pretty good (though I haven't read anything to compare it with.) It has pretty good reviews on Amazon.
https://git-scm.com/book/en/v2

DontWorryBeHappy
01-14-2016, 08:14 AM
That's very cool.

Code looks clean and I have fun studying it. Thanks!

:ape: