views:

836

answers:

14

I am currently using Subversion as my Source Control system, mainly because I found ANkhSVN to be a quite nicely integrated into Visual Studio.

But many people seem to be using Git or Mercurial and others with great success.

Now, I am wondering how to use a system like Git without some sort of IDE integration.

Going to the command line to do source control seems very awkward to me, too much hassle.

Update: this has caused quite some discussion.

I just wanted to know what your workflow is like, I know how to learn and use the command line tools. They just didn't feel that comfortable due to things like renaming/adding files. I'll stick to AnkhSVN as my svn client of choice within Visual Studio and use TortoiseSVN for files outside of VS. Anyway, thanks for your answers!

+2  A: 

I have worked with version control systems without any kind of ide integration. And yes it is kind of awkward especially if you are used to brilliant tools like tortoise. But in the end it is still possible to do your work.

[old-geek-mode] Back in the early days we had no IDE, just an editor, and a command line compiler. And of coures make ;-). [/old-geek-mode]

Gamecat
You had an editor? I had to type the program into stdin on the fly!
Michael Burr
Back in the day, I had to bootstrap my OS off an 5 1/4in floppy or toggle it in using the front panel switches. :-)
tvanfosson
Hey look over there... An old man is talking </simpsons> ;-)
Eoin Campbell
5 1/4? We even had 8 in floppies ;-).
Gamecat
I was in the lab last week, and had to make a one line change to a source code file. The machine had cygwin, but no emacs, vi, nano, nothing. My coworker recommended "notepad". So I used sed :D
KeyserSoze
I never said I havn't moved on. I also prefer Tortoise + Svn, but that was not the question.
Gamecat
+1  A: 

Most IDEs have the option to call external application that way you can keep using the source control system from within the IDE.

Also, most version control systems have some type of GUI system that you can keep open, this is also what I generally do (I use TortoiseSVN most of the time).

However, when all of the above fail, typing svn add <filename> and svn commit --message <foo> isn't all that hard ;-)

Jasper Bekkers
A: 

First, if you are happy with svn and like the client you are using, why change? Second, what's wrong with learning/using a command-line? What are your reasons for wanting to use git? Git actually plays nicely with other source control systems and you can store things in git and svn at the same time without any conflict. Git is very unix/linux centric however. It's very easy to get git running (git init, git add, git commit,...).

David Nehme
I have personal experience that git and svn don't play so nicely when your development team is spread across both Windows and Linux -- the line endings differ for these platforms, and git is finnicky.
Pistos
I asked out of curiosity..
Tigraine
A: 

meh, i'm a windows programmer too and i use cygwin and powershell every day. i am more efficient at the command line than mousing around in explorer.

Dustin Getz
+8  A: 

I just keep a command line window open at the relevant directory. It's not hard to switch between them to do the git commands. To be honest, as I'm quite new to git there's a lot more mental effort involved in checking that I'm using git correctly than there is in switching windows :)

There is a difficulty here though (at least for me, using Visual Studio): both git and Visual Studio want to be the one to do a rename. I prefer to let git do it and then add the file again as an existing item in Visual Studio, but it is annoying.

Jon Skeet
Learning the commands isn't that hard.. It just feels plain wrong. And especially because of renaming files, adding new ones etc I prefer to use something that integrates into the IDE and checks stuff like that .. Going to the shell feels .. constraining.. how do you diff.. etc..
Tigraine
Learning the commands is the right way to do it, it means you undersand exactly whats going on.
Omar Kooheji
A "use the command line" answer got the "correct answer"? That is very disappointing :(
David Arno
Actually, I approved it for the part on how to rename/add files. But after giving it some thought I'll probably remove the "answer" flag and close the question. Too subjective.
Tigraine
of the three (IDE intedgrated ,File browser integrated like Tortoise and Command line) I think the command line is probably the most powerful but the has the highest learning curve. I'm happiest with Tortoise.
Omar Kooheji
+2  A: 

Most of my projects are either embedded devices or development tools. I'm at the command line all day, so for me, it's actually a hassle to bring up my source control GUI. Any commands that are either tedious or commonly used are either aliased or replaced with a simple script.

The other advantage to this is that the process can be automated to a large degree.

Adam Liss
A: 

You can use TortoiseHg with Mercurial.

It is very similar to TortoiseSVN in it's Windows integration so you'll need to go to your command line less.

adolfojp
A: 

Doing mostly Rails development on OS X/linux I end up spending half the time at the command line anyway as that is the easiest way to run most of the support tools, and it just becomes second nature after a while. I keep an IDE or text editor open (depending on the complexity of the project) open and spend 50/50 time between that and the command line.

If you're using Visual Studio, I'm guessing that you're developing on windows. It's no wonder that using the Command line isn't a natural thing to do - no offence, it's just that the Windows console sucks and isn't exactly encouraging or pleasant to use.

Couple of things to do to make your life easier:

  • Install cygwin or similar as a replacement shell for CMD.exe and start using the *nix style command line tools. They'll give you far more power than what you get with Windows, and you'll find that it starts to get easier to use the command line for a lot of things that you'd used to use the GUI for (file copy/move operations etc, checking log files).

  • Then install Console as a replacement for the standard windows command line terminal. It's far more customisable, supports tabs, colour highlighting etc.

I did these two things when I went to a new client-site based project where we are forced to use Windows PCs. Helped enormously! Using SVN/GIT from the command line is often easier. Especially for bulk operations like this than digging through IDE dialogs.

madlep
You clearly have never experienced the powershell. It took MS decades to catch up with nix world, but when they did, they did it in style. As someone who used to spend a lot of my time writing ksh scripts, I can confidently tell you that PowerShell leaves the old unix-style shells standing.
David Arno
+7  A: 

I have Tortoise SVN integration with Windows Explorer, so any files that aren't in an IDE are easily actionable.

Zoe
I tend to use AnkhSVN inside the IDE and TortoiseSVN outside the IDE.. Works great because both share the .svn folder structure.
Tigraine
A: 

I used to use perforce from the command line exclusively -- at the time it was command line or their own p4win console. Command line was frankly easier.

But that was doing linux development, ide was vi. Doing java with IntelliJ and SVN I love the ide integration ... new class, auto added. Can manage the changelist inside the ide, diff, blame, see history ... I think the advantages of a non-integrated source control system would have to be pretty compelling for me to choose it over an integrated one.

Niniki
A: 

Personally I've been recently forced to use IDE integrated source control in both Eclipse and Visual studio and Eclipse after using Tortoise SVN, WinCVS and BZR on the command line.

I think that the IDE integrated method is the most irritating, I don't want everthing to be in the IDE, I want to use proper Diff tools etc. It just doesn't seem very intuitive.

My favourite method has to be Using a file manager integrated component as it models well to how I want the file sytem to look on the source control server.

Also I can have files in multiple different languages all under the same repository because it's not limited to the source controls understanding of the files.

Alternatively use the command line, it seems unnatural to you because you have only ever used IDE integration, it was built by and for people who live and breathe command line though, it usually makes sense.

Omar Kooheji
A: 

Have you tried git gui? I have trouble learning the commands too but feel more comfortable with git gui.

I have been using git with a .NET C# project for more than six months and I am very happy.

hectorsq
A: 

i use eclipse without plugin for mercurial. But i configure it for use. And it's seems like a plugin. I don't know about git, but in mercurial you have tortoiseHG (like tortoiseSVN). In visual studio could you add external tools?

if you can you can add this for mercurial with tortoisehg:

hgtk log <- with this you can add/remove tags, update (checkout), diff between revisions...
hgtk commit <- with this you can see what the changes are
hgtk synch
hgtk status
hgtk update

damian
A: 

Another plug for TortoiseSVN, which is excellent but not integrated into an IDE.

But you do have to be careful when adding/removing files that they have to be done in both the IDE and Subversion. It's unfortunately a bit easy to add a file in VS and forget to add it using Tortoise.

Peter