|
Are there any helper utilities around for git filter-branch? I inherited a mess of a repo where they were storing binary files, moving them around, versioning them etc... It's like 9 gigs of history for 3 gigs of actual files. I'd like a filter-branch command that would delete from the history any file that doesn't exist in HEAD. I'd also like to be able to delete the history of any arbitrary file except for the HEAD version. (Such as "*.so" or "*.a") Either of those exist?
|
# ? Aug 17, 2013 23:14 |
|
|
# ? May 13, 2024 12:12 |
|
I'm afraid filter-branch is the helper utility, that exists for unique, ad-hoc situations. I have to resist the temptation to just give you a script because I don't have access to your repo and who knows what kind of bogus assumptions I might make. However I can tell you what a gathered from a brief investigation of those two tasks: - The type of filter you need is a tree-filter. - Once you have a working tree filter, you'll also want to add a tag-name-filter as described in git-filter-branch's "checklist for shrinking a repository." - The bash test expression [ -z "$(git ls-tree master "$file")" ] checks whether a file does not exist in the master head. - The test expression [ $GIT_COMMIT != $(git show-ref -s master) ] checks whether you're currently rewriting a rev other than the master head. - You can pass a filename pattern into a filter script as an environment variable like this: PATTERN="*.so" git filter-branch --tree-filter filter.sh -- master and then somewhere in the script use the test expression [[ "$(basename "$file")" == $PATTERN ]] - Always check whether your file removals in the filter script succeeded: rm -- "$file" || exit - Your filter script should log every action it takes. Don't filter directly on the original repo, or push back to it, or delete it. Consider that you're retiring that repo and creating a new but derived one. Gazpacho fucked around with this message at 04:09 on Aug 18, 2013 |
# ? Aug 18, 2013 03:19 |
|
There's been a bit of talk about TFS and Git so maybe someone can give me some pointers here. I work from home with TFS 2012, VS 2010, I'm one of the few remote developers, the majority being in the central office. An annoyingly common thing is that while working my crappy internet connection drops and I end up doing some offline work. When I come to check-in, VS hasn't tracked any of my offline work and I miss checking in some files. This is caught by the post check-in build, but its embarrassing and time consuming to fix. The compare folders feature is so slow as to be almost useless: 20 mins or so to get the results and then another 30 secs - 1 min each time a change is made. I'd love to be able to use git to continue regular check-ins even when offline, and its better way of tracking altered files. How does this work with TFS? Does it require changes to the server (I can make requests, don't know if they'll be listened to though)? Is there another good way to work around this kind of issue (and I try to be careful but it still happens about once a month though that I break the build in this way).
|
# ? Aug 20, 2013 09:12 |
|
Dirty Frank posted:There's been a bit of talk about TFS and Git so maybe someone can give me some pointers here. Option #1: Upgrade to VS2012 and use local workspaces. That will download a local copy of the TFS repo. It's not DVCS, but it should solve the problem you're having. It'll only communicate with the server for synchronization operations, conflict detection/resolution and checkins. Option #2: Use GIT-TF. Git-tf will pull down TFS source code to a local git repo. You commit to your local repo, then use git-tf checkin and it goes and sticks the changes into TFS.
|
# ? Aug 20, 2013 17:18 |
|
Anyone use Github Enterprise here? I'd like to know when Github Enterprise catches up with Github in terms of features. There's a new CSV renderer feature in Github and I'd like to know when it'll be aviallable to Github Enterprise installations.
|
# ? Aug 22, 2013 20:48 |
|
Dirty Frank posted:The compare folders feature is so slow as to be almost useless: 20 mins or so to get the results and then another 30 secs - 1 min each time a change is made.
|
# ? Aug 22, 2013 21:07 |
|
Ithaqua posted:Option #1: Upgrade to VS2012 and use local workspaces. That will download a local copy of the TFS repo. It's not DVCS, but it should solve the problem you're having. It'll only communicate with the server for synchronization operations, conflict detection/resolution and checkins. Thanks Ithaqua, I'll check git-tf out. Eventually we'll move to vs2012 anyway, but I don't have so much control over that. Pilsner posted:I haven't used that feature, but that sounds crazy. Are you doing it while offline, so it times out or something? Try WinMerge or some other diff tool. It contacts the tfs server to do the diff, and my connection sucks and the project is over large. It does eventually return a result though. Winmerge wouldn't help here, the issue is that the repo isn't local.
|
# ? Aug 23, 2013 07:59 |
|
Recently I created a Team Foundation Service account so I can have offsite backups and work from my laptop or desktop without copying files via usb (and to just have a better tool for source control). I realized today though I may have set my projects up incorrectly. Instead of creating a folder for the solution on tfs, I pushed the solutions directly into the tfs workspace. Should I have created a solution folder and put my projects there instead? Also, this is specific to visual studio, but should I be including the 'packages' folder in tfs, or let that resolve via nuget on each local machine? May as well ask this too: Should a VS Solution be it's own project in tfs, or should each VS Project be it's own project in tfs? Assuming a solution had a UI project, DAL project and business layer project what's the right way to set that up in tfs? Under 1 tfs project or multiple tfs projects? Right now I'm only using it for source control, but would eventually like to use some of the other features, like continuous deployment, bug tracking, profiling etc. All of that is a little overwhelming for me at the moment though. Ithaqua, I think you do tfs training, do you have any tutorials/blogs that I could check out? I've attached a screenshot to clarify. Everything under BuildProcessTemplates is the actual solution: Essential fucked around with this message at 23:30 on Sep 4, 2013 |
# ? Sep 4, 2013 23:15 |
|
Essential posted:Recently I created a Team Foundation Service account so I can have offsite backups and work from my laptop or desktop without copying files via usb (and to just have a better tool for source control). I realized today though I may have set my projects up incorrectly. Instead of creating a folder for the solution on tfs, I pushed the solutions directly into the tfs workspace. Should I have created a solution folder and put my projects there instead? Also, this is specific to visual studio, but should I be including the 'packages' folder in tfs, or let that resolve via nuget on each local machine? Yes, that's wrong. Ideally, you'd have a "Main" folder with folders for all of your solutions beneath that. Then you can branch "Main" if you want to do development work in a separate dev branch. As for NuGet, I'm a fan of source controlling my third-party dependencies. That way, all anyone working on your code has to do is pull down what's in TFS, and it all builds and works like magic. Essential posted:May as well ask this too: Should a VS Solution be it's own project in tfs, or should each VS Project be it's own project in tfs? Assuming a solution had a UI project, DAL project and business layer project what's the right way to set that up in tfs? Under 1 tfs project or multiple tfs projects? You only need one team project. If you had two teams of developers working on completely separate applications with no dependencies, then you'd have two team projects.
|
# ? Sep 5, 2013 00:53 |
|
Ithaqua posted:You only need one team project. If you had two teams of developers working on completely separate applications with no dependencies, then you'd have two team projects. Thanks Ithaqua! One clarification though. I am a single developer so I AM the team. Let's say I am building a web application for Company A and I am building a desktop application for Company B (2 completely seperate apps with no dependencies). Would I have 2 team projects in tfs or just 1 and have both solutions under the "Main" folder?
|
# ? Sep 5, 2013 16:44 |
|
Essential posted:Thanks Ithaqua! One clarification though. I am a single developer so I AM the team. Let's say I am building a web application for Company A and I am building a desktop application for Company B (2 completely seperate apps with no dependencies). Would I have 2 team projects in tfs or just 1 and have both solutions under the "Main" folder? I forget if TF Service has a limit on the number of team projects you can use. My gut instinct would be to have one TP per client, although having 30 team projects for 30 simple websites is probably overkill. One argument for keeping each client's code in its own team project would be if you wanted to give them access down the line so the client can review the product backlog and the progress of the current sprint.
|
# ? Sep 5, 2013 16:50 |
|
Ithaqua posted:I forget if TF Service has a limit on the number of team projects you can use. My gut instinct would be to have one TP per client, although having 30 team projects for 30 simple websites is probably overkill. I'm on the TF Service free model and I can create UNLIMITED projects, which is really generous! The free version can only have 5 users, but that doesn't apply to me. They are going to announce pricing sometime this year, but I have an MSDN Ultimate subscription and they mention something about TF Service being included with that. Since I can create unlimited projects I think I'll just do that, one TP for each client. It may end up being overkill, but I think that's ok. edit: Actually it looks like it's still in Preview, so the only subscription they offer is the free version. It does specifically mention being included for free once pricing is announced and it moves into a live service. Is there a book you recommend for learning about all the features and how to really leverage tfs? I've been going thru the msdn docs but would like something a little more focused. edit2: Actually the msdn docs are pretty good. It's just, I'm learning EVERYTHING at once. Estimating, powerpoint storyboarding, stories, story points, backlogs, sprints, burndown, etc. on top of learning asp.net MVC and trying to become a really great c# developer. Essential fucked around with this message at 19:37 on Sep 5, 2013 |
# ? Sep 5, 2013 19:14 |
|
What happens when a client has two different projects that have two different codebases?
|
# ? Sep 5, 2013 19:52 |
|
wwb posted:What happens when a client has two different projects that have two different codebases? Yeah good question. I assume since you want each project to have it's own backlog, sprints, etc. you would have to have 2 Team Projects and therefore, the client would have 2 TP's. So perhaps the better way to do it is each unique project get's it's own TP. So a client could (and in many cases probably would) have more than 1 TP. Ithaqua, do you use the Scrum, Agile, or something else templates when using TFS? Right now I'm reading up on both, however all my projects so far have been set up as Scrum. I'm implementing Backlog's for each TP right now and tracking bugs in the backlog, along with work items. What's really great is that alone is a vast improvement over my 'search thru outlook for previous emails' method, which means I always miss stuff. Essential fucked around with this message at 21:32 on Sep 5, 2013 |
# ? Sep 5, 2013 21:09 |
|
Essential posted:Yeah good question. I assume since you want each project to have it's own backlog, sprints, etc. you would have to have 2 Team Projects and therefore, the client would have 2 TP's. So perhaps the better way to do it is each unique project get's it's own TP. So a client could (and in many cases probably would) have more than 1 TP. You can use "areas" to subdivide your team project, as well. So if you had two projects for the same client, you could have an area "Project A" and an area "Project B", and then individual queries for each that filters by area. I generally use the Scrum template. We're veering off into territory for the Agile megathread, but make sure you read up on how to estimate your PBIs accurately.
|
# ? Sep 5, 2013 22:17 |
|
Ithaqua posted:You can use "areas" to subdivide your team project, as well. So if you had two projects for the same client, you could have an area "Project A" and an area "Project B", and then individual queries for each that filters by area. Ok, I see how to configure work area's. Thanks so much for the help and the advice. I'll make sure and do your suggested reading on PBIs.
|
# ? Sep 5, 2013 23:05 |
|
I just had my hard drive swapped into a new machine at work and for some reason my SVN stopped working. I have tried uninstalling/re-installing but when I go to do a SVN Update on my existing checked out directory it just spins and spins and spins. It's seriously been spinning for like 25 minutes now (on this latest try). Is there any way to debug what is actually happening or can anyone think of anything to do to fix the issue (whatever it might be). So far as a checklist I have: Removed all authentication data Re-installed TortoiseSVN (latest version and the version I was on before, no luck with either) Disable Remove Differential Compression(RDC) Disable TCP/IP “Receive Window Auto-Tuning” and/or “Receive Side Scaling” Those last two options were a last ditch effort I read on a website about slow file transfer but I'm not even getting to that point in my update. EDIT: It finally just timed out on me. excidium fucked around with this message at 03:00 on Sep 8, 2013 |
# ? Sep 8, 2013 02:42 |
|
excidium posted:I just had my hard drive swapped into a new machine at work and for some reason my SVN stopped working. I have tried uninstalling/re-installing but when I go to do a SVN Update on my existing checked out directory it just spins and spins and spins. It's seriously been spinning for like 25 minutes now (on this latest try). Is there any way to debug what is actually happening or can anyone think of anything to do to fix the issue (whatever it might be). Use strace and see what's spinning. I had an issue where the SSL library that we were using conflicted in some way with the server, so I had to wait 5 minutes for a connection to time out for anything to happen with each command. Edit: maybe strace won't work for tortoise, but you might get it for the command line client.
|
# ? Sep 8, 2013 04:37 |
|
I ended up being able to just change my network settings to look at the Google DNS servers and that fixed the issue. Weird.
|
# ? Sep 8, 2013 23:20 |
|
I just noticed that in tortoisehg you can select single diffs in files to commit. Now I don't have to feel so bad about fixing some small one-line issues I notice while working on a bigger problem, I can just commit those separately.
|
# ? Sep 15, 2013 11:07 |
|
Wheany posted:I just noticed that in tortoisehg you can select single diffs in files to commit. Now I don't have to feel so bad about fixing some small one-line issues I notice while working on a bigger problem, I can just commit those separately. Yeah, Magit for Emacs has got this as well. It's really, really nice I imagine it is just basic Git functionality but it would be pretty awkward on the commandline.
|
# ? Sep 15, 2013 15:25 |
|
Git GUI, which comes with git makes it easy to commit lines or hunks.
|
# ? Sep 15, 2013 16:13 |
|
aerique posted:Yeah, Magit for Emacs has got this as well. It's really, really nice Git has the -p command line argument for git add, which interactively goes through your file(s) and asks you if you want to stage a change or not. I actually use this pretty regularly, and it's an awesome tool.
|
# ? Sep 15, 2013 16:22 |
|
Volmarias posted:Git has the -p command line argument for git add, which interactively goes through your file(s) and asks you if you want to stage a change or not. I actually use this pretty regularly, and it's an awesome tool. I always argue for (then never do myself) that everyone should do git add -p and git commit (no -m) as a last ditch sanity check that they're really checking in what they want to and not just adding comments like 'WIP' 'commit' or my favorite lately 'submodules' (That one had 3 submodule updates and 1 breaking change in a source file completely unrelated to the submodules, I can only assume the person did a set of git adds then a git commit -a -m 'submodules' without looking.)
|
# ? Sep 15, 2013 16:33 |
|
Hughlander posted:git add -p then git commit I tend to only need to use git add -p during complicated rebases, instead I use git commit -v as it also helps me word the commit message to see exactly what I did.
|
# ? Sep 15, 2013 19:54 |
|
Edison was a dick posted:I tend to only need to use git add -p during complicated rebases, instead I use git commit -v as it also helps me word the commit message to see exactly what I did. I just hate changes like: More x, fixed y, did z, w as well When that should be 4 changes or 3 and a rebase of previous x. And add -p can focus that. "Is this part of x? No? Skip the chunk then"
|
# ? Sep 15, 2013 20:48 |
|
Hughlander did my branch filtering reply help you at all or was it a bunch of garbage? It's really hard to give simple answers to a branch filtering problems and I don't want to be the one to blame for screwing up a production system's history.
|
# ? Sep 15, 2013 21:32 |
|
Hughlander posted:I just hate changes like: Yeah, I get super grumpy when that happens now. It was sort of understandable and acceptable with SVN but with git you really have no excuse.
|
# ? Sep 15, 2013 21:50 |
|
What I hate is code:
Great! Why?
|
# ? Sep 15, 2013 23:15 |
|
evensevenone posted:What I hate is Yeah, we've got a commit message template which has both a problem section and a solution section. Obviously, if you're adding a new feature you can probably reword this a little, but you have to go out of your way to make a bad message like the one evensevenone mentions, and you'd probably get ripped in the code review.
|
# ? Sep 15, 2013 23:24 |
|
Volmarias posted:Yeah, we've got a commit message template which has both a problem section and a solution section. Obviously, if you're adding a new feature you can probably reword this a little, but you have to go out of your way to make a bad message like the one evensevenone mentions, and you'd probably get ripped in the code review. Problem: we don't have a turnip twaddler feature. Solution: we have a turnip twaddler feature now. 34 files changed, 4207 insertions(+), 987 deletions(-) If you have code reviews this hopefully doesn't happen, though.
|
# ? Sep 16, 2013 02:42 |
|
Problem: timeout was too short (10). Solution: increased timeout to 50.
|
# ? Sep 16, 2013 04:25 |
|
Quote is not edit.
|
# ? Sep 16, 2013 04:25 |
|
Volmarias posted:Yeah, I get super grumpy when that happens now. It was sort of understandable and acceptable with SVN but with git you really have no excuse. (I'm still using SVN because, while these fancy DVCS features sound pretty nice, I'd hate to have to use a CLI, never mind teach artists to do it. I require Explorer integration.)
|
# ? Sep 16, 2013 08:39 |
|
Rottbott posted:Tortoise SVN supports it now. It's a bit clunky but good enough. There's a Tortoise client for git, although if you're requiring version control for non technical people I can understand not wanting to use DVCS. ToxicFrog posted:Problem: we don't have a turnip twaddler feature. Coordinate team rollback, "talk to" employee about proper procedures.
|
# ? Sep 16, 2013 13:12 |
|
Rottbott posted:Tortoise SVN supports it now. It's a bit clunky but good enough. There's also a tortoise client for hg which we all use at my work.
|
# ? Sep 16, 2013 17:41 |
|
Volmarias posted:Git has the -p command line argument for git add, which interactively goes through your file(s) and asks you if you want to stage a change or not. I actually use this pretty regularly, and it's an awesome tool. git checkout -p <file> also works for recovering individual lines from a file in your repo back to your working set. Very nifty when you have a bunch of changes you want to keep except for one.
|
# ? Sep 16, 2013 18:53 |
|
Gazpacho posted:Hughlander did my branch filtering reply help you at all or was it a bunch of garbage? Honestly, I haven't tried it yet. Knowing that it would invalidate the existing repo I decided to wait to see if I could just turn the code into a submodule and use git annex or something for the binaries. I did make a note of exactly what you had though so thank you for it!
|
# ? Sep 17, 2013 04:47 |
|
I'm going to pitch Atlassian's Stash to my company for git repository management. Is there any reason that this might be a bad idea? They want behind-firewall repo mangement (paranoid about theft or something I don't know and I'm not going to fight it). And since we're using Jira I figured the integration would be nice to have. It's also cheaper than Github Enterprise.
|
# ? Sep 23, 2013 16:30 |
|
|
# ? May 13, 2024 12:12 |
|
Marsol0 posted:They want behind-firewall repo mangement (paranoid about theft or something I don't know and I'm not going to fight it). This isn't a particularly strange concept. The company wants control over their own IP, and they're concerned about letting a 3rd party manage it. They'd likely want everyone in GitHub who potentially has access to your account to sign NDAs, and to sign a contract where GitHub would assume liability in the event of a breach where your codebase was leaked. I doubt GitHub would go for that, so there you are.
|
# ? Sep 23, 2013 18:01 |