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
Pardot
Jul 25, 2001




GitReady is great for looking up specific tasks, and github is the best source hosting site ever.

Adbot
ADBOT LOVES YOU

Pardot
Jul 25, 2001




Ryouga Inverse posted:

I only wish github would give me single-dev private repos free. But I can just use Dropbox, I suppose.

Check out gitosis for putting up a remote repo somewhere. I used to use that and it was fairly easy to set up. The neat thing about that is the config is stored in a git repo that you push to in order to make changes. But I recently got my company reimburse me for the $7/month. Honestly I should have just paid it all along, it's worth it.

Pardot
Jul 25, 2001




Janin posted:

That's precisely what I'm arguing, because that's something I've experienced both with my own projects, and others.
Maybe I also don't get it, but isn't that what .gitignore files are all about?

Pardot
Jul 25, 2001




Just heard about this at railsconf, and it seems cool: http://hg-git.github.com/

It lets you use HG clients but store everything in a git repo. It's not 100% yet, though.

Pardot
Jul 25, 2001




Triple Tech posted:

Why you would branch without merging I guess is an exercise left to the reader.

Because you squash the branch down to a single commit and rebase it onto master instead of merge :c00lbert:

Pardot
Jul 25, 2001




NotShadowStar posted:

Is Trac pretty much the best game around when it comes to source browsing & ticket management? I'm using Github for public stuff but for internal projects that have no need to be put out into the public I've been using SVN and thinking about Trac (although it's kind of :psyduck: to get working under FastCGI)

I use github for both public and private repos, and pivotal tracker for internal tickets. There's a nice little sintara app that can be a post-receive hook from github and update tracker. But the ticket and repo might not be as tightly integrated as you'd like if you like trac.

You could checkout redmine if you want them more integrated. I used that a year or two ago, and it was decent, but I really like pivotal tracker's way of doing tickets.

Pardot
Jul 25, 2001




pseudorandom name posted:

They ripped out Mercurial's native storage implementation and made it a wrapper around BigTable, which isn't something you can easily do with git.

I wonder if hg-git would do the trick. I've never had a reason to try it though.

Edit: I actually read the hg-git page again, and saw this is the exact opposite of what you'd need. Whoops :shobon:

Pardot
Jul 25, 2001




Ferg posted:

Ha, okay so this was way simpler than I had imagined. But thanks, much appreciated :)

The reason it's called git is because it's a "stupid content tracker". It's incredibly simple in the way it does things, which is good.

Pardot
Jul 25, 2001




What happens if you do git push origin master? That's assuming that origin is what your remote's name when you do git remote -v

Pardot
Jul 25, 2001




beuges posted:

This is probably straightforward, but is it possible to create a new repository, and import a project from an existing repository, along with all of its revision history?

You can do this by hand with git filter-branch, or do what I did and use this http://github.com/apenwarr/git-subtree

Pardot
Jul 25, 2001




Sizzlechest posted:

There's no real reason to implement a distributed system.

There's no reason not to use a dvcs. It's like this

Only registered members can see post attachments!

Pardot
Jul 25, 2001




Lysidas posted:

I believe that was a Venn diagram that illustrated the capabilities of different VCS types, and not a suggestion to use git-svn or something equivalent.

This statement is correct.

Pardot
Jul 25, 2001




ToxicFrog posted:

stash/reset might work if you realize what's happened immediately; however (at least back when this happened to me) the more common case was checkout, hack hack hack, status, oh dear it thinks everything is modified. And then you have to disentangle the real changes from the bogus ones before you can stash.

:shrug: These days I do most of my development on linux and all of it using LF linebreaks, so.

This wouldn't happen with my workflow, though it's not for everyone

  • Never work on master, always be in a topic branch.
  • make a billion commits every time any progress is made, no matter how small. I aliased gw to git add -u && git commit -m
  • rebase from master as needed when other people commit to it
  • when the feature is done, switch to master and do git merge --squash topic-branch-name then commit that with a nice message of the overall feature

That way, I can have the benefits of lots of small commits while I'm working something out, but master is one nice, linear history of what changed without all the back and forth of development.

Pardot
Jul 25, 2001




Also check out chapter 9 of pro git. It's written by githubber Scott Chacon. I've only skimmed it and the whole book looks good, but ch 9 has all those diagrams I've seen him use at the ruby conferences and such which were a big help for me.

Pardot
Jul 25, 2001




If instead, you want a good approach of how you can use git day-to-day, I recommend http://reinh.com/blog/2009/03/02/a-git-workflow-for-agile-teams.html and all the links in the notes section.

I've given up the interactive rebasing, though, in favor of git merge --squash topic-branch from master.

Pardot
Jul 25, 2001




Magicmat posted:

Is there a better way?

In the future, when you're working on a new feature, make a branch for it. Then make a bunch of small commits anytime you've made progress at all. I commit after I get a test or two passing. You'll end up with like 20 commits for that feature.

When it's done, pop over to your master branch, or wherever, and run git merge --squash featurebranch This will pull in all your little commits, and make them just one commit that has the whole feature.

You get the best of both worlds. Easy loving around with code while you're writing it, and a nice, clean, linear history of your master branch that has just the features.

http://reinh.com/blog/2009/03/02/a-git-workflow-for-agile-teams.html

Pardot
Jul 25, 2001




ColdPie posted:

Much more flexible than merge --squash is rebase --interactive (or just rebase -i). It lets you pick which commits get squashed, lets you edit the commits or the commit messages as it replays them, etc.

Yeah I used to do the interactive rebase, but turns out I always just want all of them squashed, so I got lazy and just do merge --squash. It's saves a step or two, and if you just do git commit and leave out the message, it still lets you see all the old commit messages.

Interactive rebase is awesome when you need it though, no doubt about it.

Pardot
Jul 25, 2001




Profane Obituary! posted:

Using git, can I export a set of files to their own repository, preserving history? I have a project where I want to take part of it and make it it's own project now.

Check out http://github.com/apenwarr/git-subtree

Pardot
Jul 25, 2001




CHRISTS FOR SALE posted:

Hey git experts, I installed git on my jailbroken iPhone, and I'd like to know why I can't clone repos. Here's what happens when I try to: http://gist.github.com/608718

Maybe try using the git protocol repo instead of the http one git clone git://github.com/dcinzona/LockInfo-Status-Bar-Icons---Winterboard-Theme.git

Pardot
Jul 25, 2001




RyanNotBrian posted:

but am getting "fatal: read error: Connection reset by peer".

It loos like that is down. Give git://github.com/res0nat0r/gitosis.git a try.

Pardot
Jul 25, 2001




nexus6 posted:

Man, I really wished I worked with someone who understood git, or received any training. I've been reading http://book.git-scm.com/4_rebasing.html and I can't follow those diagrams. I'm also getting confused by the term 'commit' having just come from SVN.:smith:

Make a dummy repo with like 5 files. Make a bunch of commits changing them, make branches, change them etc, then start playing with the commands and see what the results are. Practice makes perfect.

Pardot
Jul 25, 2001




ufarn posted:

Does someone know Github's shorthand syntax for tables in Markdown? It's something like `::foo: bar" for a single row of two cells, but I can't for the life of me remember how it's done. And the documentation on it is non-existent.

I wrote a thing that takes a sql query and transforms it to markdown tables, so here is a a markdown table of everyone born today who has a wikipedia article https://embedclip.herokuapp.com/lipjdmagqurraxhaaqrvfoipccrt.md

Pardot
Jul 25, 2001




Try without the trailing slash. Also if the other dirs aren't at the root level you may have to specify their full path. Also also slugignore is (as far as I know) a Heroku specific thing, not a general tool. I'm happy to help dig into this with you, but you'll probably have better luck with support.

Adbot
ADBOT LOVES YOU

Pardot
Jul 25, 2001




ufarn posted:

I'm finding it really hard to do some testing for this. I'm doing a billion commits back and forth, but I'm not sure how to test against this locally.

Regardless of what I do, I'm told that 109 static files were copied, but the slug varies in sizes - sometimes even if the .slugignore file is empty.

This stuff drives me crazy.

I probably can't post the direct source code, but looking at it, it treats each line that isn't a comment as a shell glob, an d if the file exists, deletes it. So test your lines as shell globs locally.

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