Home » Java » java – I've commited and pushed a new feature_branch on git but it doesn't show the changes on that branch after commit/push in central repository on github-Exceptionshub

java – I've commited and pushed a new feature_branch on git but it doesn't show the changes on that branch after commit/push in central repository on github-Exceptionshub

Posted by: admin February 25, 2020 Leave a comment

Questions:

So at first I just created the new branch in IntelliJ on the fly, made the adjustments to the code, push/commit the file. immediately after that I checked the central repository on github and there was no such branch. So I created the same branch directly on the github page, and when I tried to commit and push the changes this time using gitBash (even though I don’t know if there is a difference) I got this message: “On branch feature_branch
nothing to commit, working tree clean”

I checked the central repository and my changes still weren’t there. I’ve lost a whole day going back and forth I even reinstalled intelliJ.

Also I think it’s important to note that the file I commit had several errors (it’s like the class that I was working on had no Idea of other Classes in the same package), and intelliJ wasn’t showing compiler errors when I wrote the code… I tried checking the Build Project Automatically checkbox in settings and it still doesn’t work… I tried changing the project SDK, still doesn’t work.

Could the problem be in IntelliJ, and if so, where and what should I look for? I’m completely lost and need some help. Any ideas on what should I try are welcome.

How to&Answers:

Check git log if there is your change comitted, check git status if there is anything left to commit.
Try to check also your current branch git branch if you are on feature branch.