Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

SourceTree Sets Files Automatically as Staged and Shows Files I add/modify as Staged and Unstaged

Deleted user December 28, 2018

I work on a project so steps I do are like:

  1. Update my local repo, so I do pull (or fetch / merge)
  2. Create new branch (or git checkout -b my-branch)
  3. Add/Modify some files while on my-branch branch

What I observe is that SourceTree will eventually start showing:

  • Files I added or modified in both Staged and Unstaged area
  • Files I have not even touched as Staged by me (as if I have issues git add . even though I have not)

If I try to click on checkbox next to unstaged file, SourceTree shows busy circle briefly but nothing changes.  I believe it will briefly stage, then unstage it or maybe it does not, but nothing happes, my file shows still in both Staged and Unstaged area

Same happens from git on terminal.  Issuing git status shows all the files as SourceTree does as explained above.  Issuing git add . will change nothing and none of my unstaged files are added to staged area.  The "git add ." command basically has no effect just as selecting files in Unstaged area to stage them.

In attached screenshot, the files in red circle are just an example to show how they show in both Staged and Unstaged area.  The problem is that I cannot move forward which means, I cannot stage, commit, then push changes.

SourceTree.png

1 answer

0 votes
Deleted user December 31, 2018

... what is even more strange is that git ls-files --stage lists all files twice with the same guid:

 

dinosmbp:source dinob$ cd SquirrelFOH/
dinosmbp:SquirrelFOH dinob$ git ls-files --stage
100644 a658bb41271a4285977d1074a69f3302ab5cc15e 0    .gitignore
100644 a658bb41271a4285977d1074a69f3302ab5cc15e 0    .gitignore
100644 197079698252f7f85d6b1e3f68582b9cd1a9288b 0    Publishing/GooglePlay/Icons/res/mipmap-hdpi/icon.png
100644 197079698252f7f85d6b1e3f68582b9cd1a9288b 0    Publishing/GooglePlay/Icons/res/mipmap-hdpi/icon.png
100644 f03e22933ff168571cc5efac90fd4a9bbb4e5968 0    Publishing/GooglePlay/Icons/res/mipmap-mdpi/icon.png
100644 f03e22933ff168571cc5efac90fd4a9bbb4e5968 0    Publishing/GooglePlay/Icons/res/mipmap-mdpi/icon.png
100644 9f8a69a800369b1fd37061b46e808c62747115ac 0    Publishing/GooglePlay/Icons/res/mipmap-xhdpi/icon.png
100644 9f8a69a800369b1fd37061b46e808c62747115ac 0    Publishing/GooglePlay/Icons/res/mipmap-xhdpi/icon.png
100644 64c4174f8086fb7788c5ca922fd4411d8f5050ac 0    Publishing/GooglePlay/Icons/res/mipmap-xxhdpi/icon.png
100644 64c4174f8086fb7788c5ca922fd4411d8f5050ac 0    Publishing/GooglePlay/Icons/res/mipmap-xxhdpi/icon.png
100644 97a01523dd3909b8361d96c1ebd69373db33983f 0    Publishing/GooglePlay/Icons/res/mipmap-xxxhdpi/icon.png
100644 97a01523dd3909b8361d96c1ebd69373db33983f 0    Publishing/GooglePlay/Icons/res/mipmap-xxxhdpi/icon.png
100644 ab64f8448c2d2c74564c00f1cd1aca8bf1dbf200 0    Publishing/GooglePlay/Icons/web_hi_res_512.png
100644 ab64f8448c2d2c74564c00f1cd1aca8bf1dbf200 0    Publishing/GooglePlay/Icons/web_hi_res_512.png  

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events