简体   繁体   中英

Git with windows 10 ubuntu(linux)-bash

Yesterday I installed Bash on windows 10 (which is linux ubuntu terminal basically), I modified my terminal with Hyperterminal and some custom tools to get a good "version control interface" I could use around in my git folder to commit and push stuff.

Up to this point everything is working perfectly fine, however when I entered

git status

Some of the files needed to be add to the tracking. On my windows command prompt (the git bash) it was written "Your branch is up-to-date" with nothing to commit, but on the Linux side, I needed to track some files. I suspected some incompatibility or glitch because of git-windows VS git-linux. I looked at the diff to try understand what's up but the whole file was green, it basically rewrote everything from the bottom up. My piece of software is still the same, but it's like the git from linux wanted to refresh the files for some incompatibility I don't really understand. Since I will be using Sourcetree and Atom (from windows) to code but the bash terminal from linux to operate the git, I'm a bit worried that I'm trying to divide by 0 or break the law of the universe in some way that is not apparent right now but could/would/will mess up my code/head/version/log in the near future ?

As you can see this problem is hard to phrase in a concise manner on google. So that's why I came here, thanks in advance for your kind answer and patience!

I am having the same issue. I really don't see this as a CR/LF issue since git Git on WSL and Git Bash are going to look at the files in the same way.

I was wrong, it is a CRLF issue.

Fix: git config --global core.autocrlf true

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM