Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
b0lt
Apr 29, 2005
I want to track my programming assignments for a class with git. Are there any free git hosting providers that offer private repositories? Would putting each assignment in its own folder in a repo be the best way to organize things? I've got an extremely limited amount of disk quota on the university AFS share (5 MB? really?), so being able to track everything remotely but only keep the most recent assignment on disk locally would be nice.

Adbot
ADBOT LOVES YOU

sonic bed head
Dec 18, 2003

this is naturual, baby!

b0lt posted:

I want to track my programming assignments for a class with git. Are there any free git hosting providers that offer private repositories? Would putting each assignment in its own folder in a repo be the best way to organize things? I've got an extremely limited amount of disk quota on the university AFS share (5 MB? really?), so being able to track everything remotely but only keep the most recent assignment on disk locally would be nice.

if it's just for class, why do you care that it's public? You should consider it a good opportunity to get your code out there for future employers.

b0lt
Apr 29, 2005

sonic bed head posted:

if it's just for class, why do you care that it's public? You should consider it a good opportunity to get your code out there for future employers.

I just figured that it might not make my professor/TA, the school, etc. too happy if I had all of it publicly viewable, I'll send an email to ask.

b0lt fucked around with this message at 03:42 on Feb 1, 2011

Yakattak
Dec 17, 2009

I am Grumpypuss
>:3

b0lt posted:

I want to track my programming assignments for a class with git. Are there any free git hosting providers that offer private repositories? Would putting each assignment in its own folder in a repo be the best way to organize things? I've got an extremely limited amount of disk quota on the university AFS share (5 MB? really?), so being able to track everything remotely but only keep the most recent assignment on disk locally would be nice.

Email support@github.com asking for a student discount. They hook you up nice.

Free private repos

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...
Github is way better and I'd definitely go that way if it's free for you, but I use Dropbox for my private repos and it works pretty well.

Git repos are, after all, just files and folders, and Dropbox is just a folder that syncs its contents.

No Safe Word
Feb 26, 2005

Ryouga Inverse posted:

Github is way better and I'd definitely go that way if it's free for you, but I use Dropbox for my private repos and it works pretty well.

Git repos are, after all, just files and folders, and Dropbox is just a folder that syncs its contents.

How the hell did I not think of this before?

POKEMAN SAM
Jul 8, 2004

No Safe Word posted:

How the hell did I not think of this before?

Because syncing 'to the cloud' is only one advantage of a (good) version control system?

b0lt
Apr 29, 2005

Yakattak posted:

Email support@github.com asking for a student discount. They hook you up nice.

Free private repos

Oh, that's pretty awesome, thanks!

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Ugg boots posted:

Because syncing 'to the cloud' is only one advantage of a (good) version control system?

Yes, and the other advantages are already provided by git in the first place.

Github has a lot of useful features that are worth paying for but there certainly isn't anything missing from git by itself. Except a server to store your repositories on.

a cat
Aug 8, 2003

meow.
Hi guys, I'm new to the whole concept of version control and trying to learn git.

I'm having a ridiculously hard time figuring out how to host a repository on a server running Ubuntu that I can then checked out (and all other remote operations) from a client machine, which will be using Windows more than half the time.

I was following this guide:
http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way

But I keep running into issues from the Windows client. More specifically, I think the issue is with the way windows is handling the public key (I currently have it stored in C:/users/me/.ssh as wincomp.pub). But when I try to clone the remote repo I keep getting the error:
"fatal: 'testgit.git' does not appear to be a git repository"

I really have no idea what I'm doing, and I'm just dieing to get this set up so I can have a somewhat sensible development process, but I'm having the hardest drat time and I feel like it doesn't need to be this hard.

Does anyone know what might be causing this and/or have any userful tutorials on this subject?

trinary
Jul 21, 2003

College Slice
First of all if it's possible for you to use GitHub (common recommendation on this page, looks like), I'd suggest that.

That error means that whatever path you're using to find that repo isn't getting to a location with a .git directory containing a file named "config" that identifies it as a valid repository and tells git what's what.

What windows client are you using? How is it set up? Are you using Pageant or something similar to forward your ssh key? Can you 'git clone git@localhost:gitosis-admin.git' from /tmp on the Ubuntu machine? Just skimmed that tutorial and that might be a good test that at least the server side is set up ok.

UraniumAnchor
May 21, 2006

Not a walrus.
If I'm using git, what's the best way to have a Makefile rule dependent on the timestamp of the last commit? There's a file that I want to contain the latest output from "git log" as well as a couple other commands, and it'd be nice if I could rebuild it only as necessary.

trinary
Jul 21, 2003

College Slice

UraniumAnchor posted:

If I'm using git, what's the best way to have a Makefile rule dependent on the timestamp of the last commit? There's a file that I want to contain the latest output from "git log" as well as a couple other commands, and it'd be nice if I could rebuild it only as necessary.

Just an idea, but you can probably use a post-commit hook to write the last log and whatever else to a file and just have the Makefile use it as a dependency and regenerate it if it doesn't exist. You'd have to have hooks in a few different places to account for having it update after a git pull, merge, etc.

http://www.kernel.org/pub/software/scm/git/docs/githooks.html

Dooey
Jun 30, 2009
In git, I made a branch for one feature, finished the feature, and then started work on a new feature without creating a new branch (without committing anything yet). How can I commit everything to a new branch? I'm guessing it has something to do with git stash but I'm not completely sure.

Mithaldu
Sep 25, 2007

Let's cuddle. :3:
git stash
git checkout <commit id where you want to branch off>
git branch <new branch name>
git stash pop

This should do the trick.

Dooey
Jun 30, 2009
Thanks :) I just needed to switch to the branch I created before popping. That was exactly what I was looking for though.

CHRISTS FOR SALE
Jan 14, 2005

"fuck you and die"
Does anyone else here use git for large files? It does take a while for the repos to push to the backup server, but I've been using it to keep my Logic Pro tracks version-controlled. It's also AWESOME for collaboration, because we can branch the project and I could work off my own branch while my collaborator(s) can work off theirs simultaneously. I chose git based on its ability to make branches and merge them easily, because working collaboratively I have a feeling that such functionality will be crucial to our workflow.

I've also heard good things about mercurial. What benefits does it have over git? Does it handle large repos (about 1-2GB each) well? How about large files? Does it branch/merge well? My one qualm with git is that it takes a little while for everything to transfer over (like 15-20 minutes or more), can mercurial offer faster transfers or am I going to experience this everywhere due to this repo's large size?

clockwork automaton
May 2, 2007

You've probably never heard of them.

Fun Shoe

CHRISTS FOR SALE posted:

I've also heard good things about mercurial. What benefits does it have over git? Does it handle large repos (about 1-2GB each) well? How about large files? Does it branch/merge well? My one qualm with git is that it takes a little while for everything to transfer over (like 15-20 minutes or more), can mercurial offer faster transfers or am I going to experience this everywhere due to this repo's large size?

There actually isn't a huge difference between git and mercurial. There are a few differences in their basic functions and git is recognized as being faster than mercurial. There's actually some benchmarks on the git wiki about repository size and based on their numbers you probably should just stick with git. Though, I honestly can't see any harm in just seeing for yourself by using hg-git to convert the repo over and doing some benchmarking on your own.

good jovi
Dec 11, 2000

'm pro-dickgirl, and I VOTE!

CHRISTS FOR SALE posted:

Does anyone else here use git for large files? It does take a while for the repos to push to the backup server, but I've been using it to keep my Logic Pro tracks version-controlled. It's also AWESOME for collaboration, because we can branch the project and I could work off my own branch while my collaborator(s) can work off theirs simultaneously. I chose git based on its ability to make branches and merge them easily, because working collaboratively I have a feeling that such functionality will be crucial to our workflow.

I've also heard good things about mercurial. What benefits does it have over git? Does it handle large repos (about 1-2GB each) well? How about large files? Does it branch/merge well? My one qualm with git is that it takes a little while for everything to transfer over (like 15-20 minutes or more), can mercurial offer faster transfers or am I going to experience this everywhere due to this repo's large size?

I work with a few repos that are getting up in to the hundreds of MB, and mercurial can be kind of sluggish. I have very little git experience, but one of its benefits over hg that I often hear touted is its handling of large and binary files. So I'd say stick with git.

samiamwork
Dec 23, 2006

CHRISTS FOR SALE posted:

Does anyone else here use git for large files? It does take a while for the repos to push to the backup server, but I've been using it to keep my Logic Pro tracks version-controlled. It's also AWESOME for collaboration, because we can branch the project and I could work off my own branch while my collaborator(s) can work off theirs simultaneously. I chose git based on its ability to make branches and merge them easily, because working collaboratively I have a feeling that such functionality will be crucial to our workflow.

I've also heard good things about mercurial. What benefits does it have over git? Does it handle large repos (about 1-2GB each) well? How about large files? Does it branch/merge well? My one qualm with git is that it takes a little while for everything to transfer over (like 15-20 minutes or more), can mercurial offer faster transfers or am I going to experience this everywhere due to this repo's large size?

Where I work we have a beast of a repo containing many bad decisions that we recently converted to Git. The bare repo is just under 5 GB and we have many files in there that are over 100 MB and Git still stays quick (previously it was in SVN and I was interacting via Git-SVN and it was still fast). As long as you're using a good transport mechanism (HTTP only got "good" in recent versions of Git) transfers will be pretty fast.

edit: I should add that we use it for code mostly and our big files are 3D models and various libs that we need to compile our code. Our binary files don't change very often. It looks like you'll be working with binary files exclusively. Git will try to be smart about delta compressing changes but I wouldn't necessarily expect the same performance as people using it mainly for code. I'm pretty sure it'll work fine though.

samiamwork fucked around with this message at 06:03 on Feb 25, 2011

HFX
Nov 29, 2004

Mithaldu posted:

git stash
git checkout <commit id where you want to branch off>
git branch <new branch name>
git stash pop

This should do the trick.

You can combine those the checkout and branch as git -b <branchname> <commit-id>


CHRISTS FOR SALE posted:

Does anyone else here use git for large files? It does take a while for the repos to push to the backup server, but I've been using it to keep my Logic Pro tracks version-controlled. It's also AWESOME for collaboration, because we can branch the project and I could work off my own branch while my collaborator(s) can work off theirs simultaneously. I chose git based on its ability to make branches and merge them easily, because working collaboratively I have a feeling that such functionality will be crucial to our workflow.

I've also heard good things about mercurial. What benefits does it have over git? Does it handle large repos (about 1-2GB each) well? How about large files? Does it branch/merge well? My one qualm with git is that it takes a little while for everything to transfer over (like 15-20 minutes or more), can mercurial offer faster transfers or am I going to experience this everywhere due to this repo's large size?

Repo size itself isn't a huge issue. However, I would not recommend checking in files larger then a gig or 2. You end up running out of memory often.

What does everyone do about 3rd party libraries needed to compile their code. I'd rather not check in specific version tar.gz files into the repo (I actually hate seeing built binaries and tarballs in a repo). I guess I'm looking for an updated non retard version of GForge which will work with git.

HFX fucked around with this message at 09:04 on Feb 25, 2011

ColdPie
Jun 9, 2006

HFX posted:

What does everyone do about 3rd party libraries needed to compile their code. I'd rather not check in specific version tar.gz files into the repo (I actually hate seeing built binaries and tarballs in a repo).

Have the code untarred in your source tree. Or use submodules, either with the project's official Git repository out on the Internet, or with a Git repo that you've set up for the project yourself. Submodules are not as bad as everyone makes them out to be.

Modern Pragmatist
Aug 20, 2008
I'm currently working on setting up SVN to deal with some of the projects that I have been working on. Basically I have utility functions and modules that are shared between many projects. The majority of development is going to be on creating new modules and combining these in new projects.

I know that you can use externals in SVN to download the necessary code (utils and modules) when a particular project gets checked out, but I feel that this could get messy quickly.

Any advice on how to best approach setting up my repository would be helpful. I can provide more detailed information if necessary.

Here is an example of my directory structure that I'm working with. Modules typically depend on utils and projects use multiple modules and utils.

code:
/utils
    /stats
        ttest.c
        variance.c
    /imaging
        normalize.c
        fliplr.c
        flipud.c

/modules
    /ImageProcessor
        ImageProcessor.c
    /ImageSelector
        ImageSelector.c

/projects
    /ImageViewer
        ImageViewer.c
    /ImageSorter
        ImageSorter.c
        sortFcn.c

wwb
Aug 17, 2004

If they don't change that much, and they need to be changed in concert, I would just figure out how to statically link the binaries rather than dynamically include the source.

That might just be me.

ColdPie
Jun 9, 2006

Modern Pragmatist posted:

Any advice on how to best approach setting up my repository would be helpful.

Don't use SVN.

Mr.Hotkeys
Dec 27, 2008

you're just thinking too much
So I setup a repository on BitBucket, using TortoiseHG to push/pull/etc. On my end, everything works absolutely beautifully. For my friend, however, not so much. Every time he pulls and updates, the repository corrupts. Missing files, and everything he tries to do in workbench throws an error. He sent me the repository zipped and it does the same for me. Even if he wipes everything and starts anew, pulling and updating always results in some horribly corrupt repository. I figure it's got to be either the settings that are hosed or some other installed component, but everything's version seems to match mine and I can't find any settings that he might have set that would do this. And in any event he tried a clean install and it didn't solve anything.

I've run verify and have a few error messages I can post if that'll help. Basically I'd just like to figure out what the hell.

And I'm not married to HG, but I'd like to stick with it unless it's some horrible joke that I'm just not in on. It's been working great for me, just not so much for my partner.

e: And I've tried creating new repositories and it's worked fine every time.

Here's what it says when I open it in the workbench and just simply click the Working Directory changeset, and here's what it says when I run verify.

Mr.Hotkeys fucked around with this message at 22:39 on Mar 5, 2011

indulgenthipster
Mar 16, 2004
Make that a pour over
The link for Github education discounts is at: https://github.com/edu

Modern Pragmatist
Aug 20, 2008
I ended up going the git route and am pretty happy with that.

When I clone my repository to my local drive, is it ok to clone it into my Dropbox folder and then make modifications from two computers (work and home)? I guess I'm concerned that possibly Dropbox may mark files as changed even though nothing has truly changed.

good jovi
Dec 11, 2000

'm pro-dickgirl, and I VOTE!

Modern Pragmatist posted:

I ended up going the git route and am pretty happy with that.

When I clone my repository to my local drive, is it ok to clone it into my Dropbox folder and then make modifications from two computers (work and home)? I guess I'm concerned that possibly Dropbox may mark files as changed even though nothing has truly changed.

That seems really belt and suspenders, and kind of ignores the whole point of using a DVCS. Just push back to github and pull those changes at home.

Modern Pragmatist
Aug 20, 2008

Sailor_Spoon posted:

That seems really belt and suspenders, and kind of ignores the whole point of using a DVCS. Just push back to github and pull those changes at home.

I guess I was thinking more for the case where I am working on a bug for a day or two and I don't necessarily want a commit midway through.

Mithaldu
Sep 25, 2007

Let's cuddle. :3:

Modern Pragmatist posted:

I guess I was thinking more for the case where I am working on a bug for a day or two and I don't necessarily want a commit midway through.

Branch! You can branch, switch branches and merge branches ridiculously easily and quickly in git. If you rebase them you can even make branches just vanish into your linear history after the fact.

Modern Pragmatist
Aug 20, 2008

Mithaldu posted:

Branch! You can branch, switch branches and merge branches ridiculously easily and quickly in git. If you rebase them you can even make branches just vanish into your linear history after the fact.

Ok. I'll read up on it. Thanks for the help.

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Modern Pragmatist posted:

I ended up going the git route and am pretty happy with that.

When I clone my repository to my local drive, is it ok to clone it into my Dropbox folder and then make modifications from two computers (work and home)? I guess I'm concerned that possibly Dropbox may mark files as changed even though nothing has truly changed.

For personal projects I use dropbox as my own private github and it works fine. But yeah, don't use dropbox when branches will suffice.

Though I do like the idea of using it as your working folder so you don't get home and realize you didn't push your changes at work.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

I'm fairly new to version control, so was hoping I could get some feedback about what I plan to do with git...

I've got an Android app that has a full-featured paid version, and a limited features free version. There's some changes I have to do to code that will be released to devices. I'm planning on having four branches:

full_featured
full_featured_release
limited_features
limited_features_release

I do most of my development in full_featured (with branches for feature development and whatnot). I merge changes in it into limited_features and do a bit of finagling to limit the available features there.

When I want to do a release version, I merge from full_featured into full_featured_release, and from limited_features into limited_features_release. The *_release branches contain the changes needed for release. I tag the latest commit with my release name/version number.

Am I overthinking this? Is there some obvious better way to do this that I just don't see because I'm an amateur?

pseudorandom name
May 6, 2007

Wouldn't it make more sense to have a single branch and different targets in your build system that output the free and paid versions?

Mine GO BOOM
Apr 18, 2002
If it isn't broken, fix it till it is.
We are using Mercurial with two shared repositories, a staging repo and a production repo. People push to staging for QA to test, then we pull those changesets to production. The problem is that each change gets individually scheduled for releases depending on management whims, so we need to cherry pick changes to pull from staging to production.

Right now we transplant the changes, but that leaves an ugly mess when we want to push/pull between production/staging repos. Anyone have a recommendation for a better way to have a staging repo that gets changes pushed to it whenever they are done, but won't go to production until management rolls some dice and comes up 12?

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

pseudorandom name posted:

Wouldn't it make more sense to have a single branch and different targets in your build system that output the free and paid versions?

That may be true. I'm not really familiar with this kind of stuff...I'm just a hobbyist, really.

This is probably getting out of the domain of this thread, but does anyone have any suggestions on how to output my free and paid versions when building from Eclipse?

epswing
Nov 4, 2003

Soiled Meat
I feel like this should be somewhere right in front of me but I'm not seeing it.

Using tortoisehg, how can I visually compare a file to an earlier version of itself? Using whatever, kdiff3 or WinMerge. I want to initiate this from the Repository Explorer.


Edit: Basically if I add
code:
[extensions]
hgext.extdiff=

[extdiff]
cmd.vdiff = kdiff3
to my hgrc and then type
code:
hg vdiff -r 12 -r 59 src\Batch.cpp
at a command prompt, that's exactly what I want to do from the repo explorer.

epswing fucked around with this message at 15:08 on Mar 31, 2011

litghost
May 26, 2004
Builder

epswing posted:

I feel like this should be somewhere right in front of me but I'm not seeing it.

Using tortoisehg, how can I visually compare a file to an earlier version of itself? Using whatever, kdiff3 or WinMerge. I want to initiate this from the Repository Explorer.

Depends on what version of TortoiseHg. Before 2.0 you can just left-click revision A and right-click revision B, then click "Diff with selected" or "Visual Diff with selected". Either way, double-click the filename in particular you want to open in the diff tool. For whatever reason they decided not bring this feature into 2.0. In 2.0 you can only diff against the local for whatever reason. In 2.0, right-click B revision and select diff to local.

Adbot
ADBOT LOVES YOU

Captain Corny
Dec 16, 2000

I wrote an article about my first experiences with Git on Windows, and would appreciate some feedback.

http://dikhoffsoftware.com/2011/04/why-i-dont-like-git/

(I switched back to SVN)

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply