|
poty posted:I'm starting my first project with CVS (or Version Control in general) in a few days. It's an established project that's been going on for years. I've quickread a couple of tutorials and I think I get it, but I'm still concerned. For the love of God, when you're learning a new version control system, back up your source tree on your local computer every once in a while, particularly right before doing a commit/update/merge. Screwing up the repository on the server is varying degrees of difficulty, ranging from relatively easy with CVS to almost impossible with just about anything else, but you will, at least once in your learning process, accidentally wipe out your local changes. The best way to avoid this, somewhat counter-intuitively, is to commit often. The really rough stuff starts to happen when your local tree is way out of sync with the server tree. The flipside to that is, you don't want to commit partial changes. The thing to work toward is learning to conceptually break big changes up into smaller self-contained changes. That'll also aid in testing.
|
# ? Feb 10, 2012 01:29 |
|
|
# ? May 16, 2024 18:18 |
|
ufarn posted:Not sure it went as planned. I had forgotten to delete .git-rewrite and grant git bash full permissions. This is what I got: It didn't go as planned because you told git filter-branch to make some changes that are already applied. That is, "make a new commit with the author and committer set to these values, but everything else the same" resulted in identical commits since the authorship information already matched the modification you did. Run this: code:
|
# ? Feb 10, 2012 01:45 |
|
I need some help/advice with git. Here's the sequence of events I just went through. We use gitolite. 1) Merged new branch into master. 2) Pushed. 3) The post-receive hook on the server side then went to our production directory and did its "git pull origin master" to get the code from the gitolite repository to the website. 4) We discovered a bug moments later. 5) I open gitk, right click the previous commit and say 'reset master branch to here'. 6) I commit and hit git push, forcing the matter. 7) The gitolite repository now has the reverted master. 8) However, when the hook executes, it sees that the version in the web directory is newer than the version in the gitolite repository, and does nothing. How can I force this last command to pull the version that's in origin? I've tried git pull -f origin master but it still says 'Already up to date".
|
# ? Feb 28, 2012 19:01 |
|
git reset origin/master --hard Note that in step five you probably should have reverted rather than resetting. Rewriting private history can be awesome, but rewriting public history rarely is.
|
# ? Feb 28, 2012 19:30 |
|
Plorkyeran posted:git reset origin/master --hard Thanks! I was panicking and went with the first option that appeared. What command should I have done, just 'git revert' and give it the id? Golbez fucked around with this message at 20:43 on Feb 28, 2012 |
# ? Feb 28, 2012 20:08 |
|
Yes, or just git revert HEAD for the specific case of reverting the last commit.
|
# ? Feb 28, 2012 20:46 |
|
Out of curiousity: Are any of you SVN/git guys going to be taking a look at TFS express?
|
# ? Feb 28, 2012 20:49 |
|
I can't really imagine any situation where I'd choose to use TFS short of "Made by Microsoft" being a hard requirement.
|
# ? Feb 28, 2012 21:30 |
|
I'm a pretty dyed in the wool MS guy and I won't use sharepoint or TFS because the products blow that much.
|
# ? Feb 28, 2012 21:36 |
|
wwb posted:I'm a pretty dyed in the wool MS guy and I won't use sharepoint or TFS because the products blow that much. I don't know enough about Sharepoint to debate the point, but why do you think that TFS blows? My employer does TFS consulting and I'm currently writing a bunch of cool software leveraging the TFS API, so I'm curious to know what soured you on it.
|
# ? Feb 28, 2012 21:52 |
|
I don't think TFS is awful per se, but it's a centralized source control system that's overly tied to Visual Studio and doesn't really have any compelling features to make up for this.
|
# ? Feb 28, 2012 22:31 |
|
Locked checkouts. Needing $8k + worth of licensing to work beyond TFS. Sharepoint integration. Requiring Visual Studio on my build server. I've heard TFS2010 is better, and the API might well be good. But it is managerware more than useful development tool.
|
# ? Feb 28, 2012 23:02 |
|
wwb posted:Locked checkouts. You can explicitly lock a file, but I've never seen a good reason to do so. It defaults to no locks, at least in 2010. quote:Needing $8k + worth of licensing to work beyond TFS. TFS can be pricey, I'll give you that. That's why Microsoft is releasing an Express edition; they want to upsell. quote:Sharepoint integration. Sharepoint isn't required to use TFS. If you're going to ding it because it can integrate with Sharepoint, I don't know what to tell you. quote:Requiring Visual Studio on my build server. Not true, as far as I know. I could be wrong on this one, though. quote:But it is managerware more than useful development tool. I've only used VSS and TFS (2008, 2010, and the beta of version 11) professionally, so I can't speak to the strengths and weaknesses of TFS over anything other than VSS. I'd disagree with that statement, though. With a minimum amount of dicking around, you can have source control and CI scripts running. If anything, I've seen the "managerware" aspects of it misused/underused/unused more than the source control aspect.
|
# ? Feb 29, 2012 00:23 |
|
Ithaqua posted:Out of curiousity: Are any of you SVN/git guys going to be taking a look at TFS express? I assume the client and server software don't run on Linux or Mac OS, so that's a resounding "no". I'll also never consider going back to a centralized version control system for managing code; maybe for huge art assets that graphic designers work on. (Seriously, why would you develop software on/for Windows in 2012? )
|
# ? Feb 29, 2012 01:17 |
|
^^^Just got through working our art department through the move from SVN to HG. Actually went pretty well. Hard part is selling them on the concept of sane and rational version control. Getting them to use the tools is relatively easy. @Ithaqua: very reasonable retorts. I will concede I am perhaps a bit too negative on the product. On the other hand: quote:I've only used VSS and TFS (2008, 2010, and the beta of version 11) professionally, so I can't speak to the strengths and weaknesses of TFS over anything other than VSS. I'd disagree with that statement, though. With a minimum amount of dicking around, you can have source control and CI scripts running. If anything, I've seen the "managerware" aspects of it misused/underused/unused more than the source control aspect. I've got SCM and CI setup using SVN, git and HG and TeamCity in matters of minutes. Really issue tends to be the project not being CI-friendly rather than the SCM platform or CI server. TFS does do some things to make it easy, but the stuff it makes possible really isn't hard.
|
# ? Feb 29, 2012 02:50 |
|
How do I get hg to ignore further changes to a file? I have a file that is generated. There's a version in the repo that is considered the 'canonical' version, however the file is regenerated every time I run my program. I want to hg to ignore those local changes and never ask me to commit it again. I added the file to .hgignore, but that just stops the file from being added to the repo if it isn't already; it will still try to add changes to the file into the repo if the file already exists in the repo. This is annoying both for the aesthetic issue, but also because hg doesn't like to merge or do other potentially destructive changes with uncommitted local changes.
|
# ? Feb 29, 2012 11:29 |
|
Magicmat posted:How do I get hg to ignore further changes to a file? I have a file that is generated. There's a version in the repo that is considered the 'canonical' version, however the file is regenerated every time I run my program. I want to hg to ignore those local changes and never ask me to commit it again. You can't do this as far as I know in any versioning system. If the file is versioned, it's versioned for good. What you can do is take the good file, make it file.good.template and commit that to the repo, then ignore file.good and just copy file.good.template to file.good as part of your build process or manually when you first clone the repo.
|
# ? Feb 29, 2012 14:55 |
|
I just started actually doing branching and merging with TFS, and I don't get why something happened the way it did. I created my branch, and did my crap. I checked in all that code into my branch. Afterwards, I merged the main branch into my branch, dealt with the conflicts, then checked it in. I then tried to merge my branch into the main, and I got a few conflicts. Between the time of the two merges, nobody else had committed anything into main. So how could that have even happened?
|
# ? Feb 29, 2012 21:06 |
|
musclecoder posted:You can't do this as far as I know in any versioning system. If the file is versioned, it's versioned for good. You can do this in git. git update-index --assume-unchanged <file>
|
# ? Mar 3, 2012 01:08 |
|
That isn't what that's for, though, and may cause you problems later.
|
# ? Mar 3, 2012 01:14 |
|
pseudorandom name posted:That isn't what that's for, though, and may cause you problems later. Not sure how that isn't what it's for, the git update-index command is the command that is used to... update the index, which if you don't want a file to register as changed in the index, you tell the index not to track changes to it.
|
# ? Mar 3, 2012 02:22 |
|
I've made a branch, foo, with a bunch of changes from when I branched out from master a couple of weeks ago, so the difference between the two is likely to be huge. As a result, a lot of files will be affected, and I want to make sure I am able to scrutinize all the affected files to resolve any conflicts after the two are merged to one. On Windows or Ubuntu, what is the best way to view an intelligible representation of the changes and affected files, and what other precautions do you recommend, before I pull the trigger?
|
# ? Mar 4, 2012 17:57 |
|
ufarn posted:I've made a branch, foo, with a bunch of changes from when I branched out from master a couple of weeks ago, so the difference between the two is likely to be huge. Without sound like an rear end, can I ask why it matters? Why not just do the merge and see what conflicts, fix those, and then commit them? I presume you're using git since you mentioned master as the mainline branch, and it (along with any decent VCS) will tell you the conflicts.
|
# ? Mar 4, 2012 18:38 |
|
I think it's totally reasonable to review a branches changes before you merge - we do that with another developer literally every time we pull anything into our mainline branch. git diff master..branch_name will give you all the commits. If you want something prettier than text output, I'd imagine all of the graphical tools have some sort of diff available. Better yet, if you're on GitHub, you can use pull requests to get a great diff view before merging, and even add comments for things to fix before you pull it into your mainline.
|
# ? Mar 5, 2012 03:32 |
|
enki42 posted:I think it's totally reasonable to review a branches changes before you merge - we do that with another developer literally every time we pull anything into our mainline branch. I did, however, go back to change some things on master, so the pull request on branch_name will be a bit misleading, right? Unlike git diff master..branch_name, I take it this will be a diff between the last master commit, before I branched to branch_name, right? In other words, if we say that I made the branch at master 1.0 and later updated master to 2.0, git diff master..branch_name will show the difference between: * master 2.0 and branch_name and the pull request will show the diff for: * master 1.0 and branch_name ufarn fucked around with this message at 04:05 on Mar 5, 2012 |
# ? Mar 5, 2012 04:03 |
|
I can't offer any git specific advice, but KDiff3 is a pretty good GUI diff program for looking at things.
|
# ? Mar 5, 2012 04:46 |
|
ufarn posted:Great tips/tricks! Wrong.
|
# ? Mar 5, 2012 05:32 |
|
By the way, I just downloaded SourceTree, and I wanted to say it's a pretty awesome repository browser. I still like to do most of my actual commits on the command line, but to get a visual of what's going on, or a nice pretty diff, it's pretty awesome.
|
# ? Mar 6, 2012 04:59 |
|
Does anyone care to give their input on the big hosted services? I Googled some reviews but they all basically say 'hurr use github' Bitbucket Github SourceForge Google Code <any others I don't know about> I use svn at work but I've played around with git so I'm not committed to any certain system. I also wouldn't mind any recommendations for a free host that will allow you to keep a private repo. I assume you can make your repo read-only to the world, but what about projects you don't want anyone else to access? I may just setup git/svn on a VPS, and just back that up every night.
|
# ? Mar 6, 2012 14:42 |
|
Bob Morales posted:Does anyone care to give their input on the big hosted services? I Googled some reviews but they all basically say 'hurr use github' If private repos are important, use bitbucket. If you want other people to see and participate in the development of your project, use github. It's not so much "hurr, use github" as "github is better than everything else in every way". The one exception is that bitbucket gives you unlimited private repos. And they let you use git anyway, so it's not a huge investment if you later decide that github is the tool for you. Otherwise, what do you want to hear about them? They're ugly and don't have the features or the userbase that github does.
|
# ? Mar 6, 2012 15:52 |
|
Bob Morales posted:Does anyone care to give their input on the big hosted services? I Googled some reviews but they all basically say 'hurr use github' 1. old 2. built for old VCS Github is the best because it's young and built for what is currently the best VCS. There's just no contest.
|
# ? Mar 6, 2012 16:09 |
|
Mithaldu posted:The problem is that those that aren't github are: Bitbucket is younger and was built with mercurial in mind from the ground up
|
# ? Mar 6, 2012 16:29 |
|
Totally concur with Sailor_Spoon. I generally look to bitbucket first then github. Github has a bit more cache and a social angle but thinking about how I discover open source projects it really don't matter where they are as long as the source is hosted somewhere public. I'm not going to go browse projects on github per-se. PS: I should add I was just making the corporate "which DCVS host are you going with" decision the other month. Bitbucket won.
|
# ? Mar 6, 2012 16:44 |
|
I liked the Wired article that likened Github to FacebookWired posted:GitHub.com is best thought of as Facebook for geeks. Instead of uploading videos of your cat, you upload software. Anyone can comment on your code and add to it and build it into something better. It's not that Github is technically superior but that everyone is on Github it has a network affect that makes Git and Github better. I would say for personal or open source software go with Github but for closed source software Bitbucket is a better choice (free for under 5).
|
# ? Mar 6, 2012 16:55 |
|
gariig posted:I liked the Wired article that likened Github to Facebook GitHub is probably the biggest darling of the tech industry right now, and it's so popular that it's like a digital CV for people. It makes it so much easier to show people what you've done and can do, and the great design facilitates this even more.
|
# ? Mar 6, 2012 17:06 |
|
fwiw, for my last project I went with google code. I think that might have been a mistake. (lol they recently just flat out removed the 'recent activity' thing from projects.) I don't have anything to say about the others other than prefer bitbucket over google code. (Also, sourceforge is still a thing that exists?)
|
# ? Mar 6, 2012 19:20 |
|
crazypenguin posted:(Also, sourceforge is still a thing that exists?) FileZilla, Boost, VLC, DOSBox, lots of stuff is hosted there. I always get pissed when a download link takes me to their ad-ridden, slow servers.
|
# ? Mar 6, 2012 19:37 |
|
SourceForge isn't a terrible choice for distributing software packages, but you'd be insane to use it for anything else.
|
# ? Mar 7, 2012 05:16 |
|
This is a little beyond the scope of just 'source control' but maybe someone can point me in the right direction. I'm getting into later stages of a CS degree, and starting to work on more serious projects (in C#/C++/VS2010 and java/intellij). And I'll be starting to work on more small team projects. At a minimum, I'd like to setup a small repository, but also... I'm looking to do a lot of CUDA/OpenCL programming, and rather than spend $1500+ on some portable workstation laptop, I figure it must be possible to setup some kind of central build/debug server where I can load up one or two high end GPUs for a pittance compared to any real laptop. I know at least Team Foundation can do this, but it seems like it's more geared for automated unit testing and the like, not actual live step-by-step debugging and tracing. And short of constantly using remote desktop, I don't see any way to interact with the programs as they're running. And of course Team Foundation doesn't help with any java work I want to do. (I do have full MSDN and can get TF server for free.) I guess the simplest is just remote into a normal machine running VS/IntelliJ that's also setup with source control, check out, build and run. But that seems really clunky. I've run VS through remote desktop before and it's painful.
|
# ? Mar 7, 2012 06:26 |
|
|
# ? May 16, 2024 18:18 |
|
Rescue Toaster posted:This is a little beyond the scope of just 'source control' but maybe someone can point me in the right direction. You probably want a "Continuous Integration" system. Most simply, it can watch your source control repository for changes and do a new build whenever code is checked in. Of course there's a ton of flexibility in what else it can do. I prefer TeamCity for this. It has a ton of flexibility while still being relatively easy to set up. It's free for small projects and teams.
|
# ? Mar 7, 2012 21:11 |