Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Netbeans: COMMIT [HEAD] does not exist

Tags:

git

netbeans

Using Netbeans (I just updated to v7.4 and I'm still having the problem), I have cloned a projet from a GIT repository. After it, when I do commit and push, everything is working fine. However, since Commit/Push via Netbeans can be very slow with big projects, sometime to save time, I do commit and puch directly from the command line. Here are the commands I'm using to commit/push manually:

git add -Av
git commit -avm "commit via command line"
git push -v origin

It works just fine. The only problem is that after it, it looks that Netbeans does not regognize my git project anymore. For example, if I change a file, the tab does not become blue anymore. Also, if I try to do a Commit via Netbeans, I'm receiving the following error

COMMIT [HEAD] does not exist

So, is it a bug with Netbeans? Is there a way to manually reset/fix the Netbeans project so that it works fine with git even when I do git command via the command prompt? The only work arround I found is to do a new complete Clone of the project in a new blank folder via Netbeans.

Thanks in advance for any help somebody could provide me about this behaviour.

G. Plante

like image 357
G. Plante Avatar asked Apr 12 '14 11:04

G. Plante


People also ask

How to commit in Netbeans?

To commit files to the Git repository: In the Projects window, right-click the file(s) you want to commit. In the context menu, choose Git > Commit .

Which command is used to view the history of the changes in git?

The git log command displays all of the commits in a repository's history.


1 Answers

Purely using the Netbeans (V8) Git facility I initialised a local repository from my new Netbeans project and as you say when I tried to commit I received the COMMIT [HEAD] does not exist error. Simply by stopping and starting Netbeans the commit then worked. So if in doubt reboot !

like image 73
Shaun O'Hagan Avatar answered Oct 03 '22 09:10

Shaun O'Hagan