I am using git bash. I created a brand new local git repository from a brand new public repository ( means it just had .gitIgnore file. no code) I branched off from my local master repository to a new repository 'FromClearcase' using:
git branch FromClearcase
git checkout FromClearcase
I pasted 49 files of code into my local git repository.
Following shows all these 49 files as untracked.
git status
Next I do following:
git add --all
git commit -m "Migrating from CC"
I get following message "On branch FromClearcase nothing to commint, working directory clean" when it do following git status
Next is where the I have a surprise observation. I want to switch back to local master branch to perform a merge.
git checkout master
I get following message: Checking out files: 100% (49/49), done. Switched to branch 'master' Your branch is up-to-date with 'origin/master'
I am unable to comprehend the message in first line. Why does 49/49 stat apears when I am trying to switch? 'git checkout master' must not trigger checking out of code that belongs to a different branch. What is happenning ?
Your git client is just telling you that it performed 49 file operations to check out the tree you asked for. What it doesn't tell you is that in this case, all 49 operations were removals (it removed the 49 files that you committed in your other branch). The confusion arises because most people read "checking out files" as if it was referring exclusively to create/copy operations.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With