0

I have recently migrated to GIT from SVN and in the learning phase. I am working on a change and for that I have created a new branch as below with eclipse option as:

Right click on project-->Team-->Switch To-->New Branch

New branch name : feature/Fix-Issues

Say for instance, I have modified two files as part of the fix as :

A.java
B.java

After doing my changes, I have committed the files with eclipse 'Commit and Push'. I can see a new entry has been added in the history. So far so good.

I am using Cygwin for using git commands. In order to verify that I have checked out to my feature branch, I have issued below command:

git branch

Which says that I am checked out to my feature branch (feature/Fix-Issues).

Now, if I ran below command:

git status

It returns as Changes not staged for commit :

modified:<package>/A.java
modified:<package>/B.java

I am not able to understand this part as I have checked in the files from Eclipse and have successful commit message in the history as well. Any lead would be really helpful.

NullPointer
  • 152
  • 1
  • 16

2 Answers2

2

Since you were saying like you haven't cloned the same repository anywhere else. It might be because of the local repository not updated properly. Try the following options:

1. Updating the branch

 git checkout your_branch

2. Take a pull/fetch

git pull will pull the latest changes.

git fetch will update the list of changes.

Subash J
  • 2,028
  • 3
  • 13
  • 27
  • _git pull_ : returns Already up to date. _git fetch_ : executed successfully with out any messsage. Run _git status_ shown same message _Changes not staged for commit_ – NullPointer Jul 02 '18 at 14:06
0

The issue was related to filemode . I have made filemode=false . Please have a look on below link How do I make Git ignore file mode (chmod) changes?

NullPointer
  • 152
  • 1
  • 16