Is it necessary to install Git in Windows 10 if it already exists in Bash Ubuntu?

4

I just bought a computer with Windows 10 (so far I've only used Windows 7, I did not need Windows 8 and 8.1). The first thing I did with this new toy was to install Ubuntu Bash. I've tried this bash and it's decent to be a beta version (I'm going less than an hour, but at least for what I did it's fine).

Now I'm installing tools for day-to-day development, and I was about to download Git. Before that, I tried if Git was already installed in bash and I see that yes.

My question: is it necessary to install Git on Windows again or is it enough to use the version that already exists in bash? Is there a problem when modifying the files, maybe the end of line is lost between CR / LF and LF? Is there any consideration I should have with this decision?

    
asked by Mariano 16.07.2017 в 04:01
source

2 answers

1

It is not necessary if your idea is to use git directly from bash.

Now, if you are going to use an IDE to develop and you want to integrate with git then you do need a Windows client.

I particularly use SourceTree to see the pending changes (very useful when the commit has an interesting size) integrated with Git for Windows .

These tools maintain line breaks as defined in the file.

    
answered by 26.07.2017 в 13:58
1
  

Is it necessary to install Git on Windows again or is it enough to use   the version that already exists in bash?

No, it is not necessary, the only thing is that you need to run bash before you can run git (which in turn needs WSL), this makes it a bit more tedious to use with third-party tools.

> bash -c -- "git args..." 
  

Is there a problem when modifying the files, perhaps the end of   line lost between CR / LF and LF? Is there any consideration that   Should I have with this decision?

It will depend on the use of the files, if you want guaranteed interoperability then you should use \ CR \ LF to indicate the line break. Most editors have tools to change this automatically, so it's no problem.

    
answered by 26.07.2017 в 16:22