Answer the question
In order to leave comments, you need to log in
Why can't commit to git?
Here is the Git Gui program, I make a new repository, change and add files there, make a stage and then press commit, and it says to me that there were no changes and cannot send a commit. And why is this happening?
Answer the question
In order to leave comments, you need to log in
Judging by the screenshot, there are no changes at all (the "Unstaged Changes" area is empty, the "Staged Changes" area is empty). If there are still changes, then you can check if the files have been added to .gitignore. Edit this file as needed and check if there are changes displayed.
If there is no .gitignore file, or it is empty, or the files that you changed are not included there, then open the command line anyway and check in your clone:
^-- will display file changes and files that are tracked / not tracked.
^-- will add the file for change control
^-- will indicate that the file has been added
^-- will commit the changes
The following is an example of how this might happen when using .gitignore
[email protected]:~/Projects/temp$ ls -a
. ..
[email protected]:~/Projects/temp$ git init
Initialized empty Git repository in /home/boris/Projects/temp/.git/
[email protected]:~/Projects/temp$ touch filename
[email protected]:~/Projects/temp$ git status
On branch master
No commits yet
Untracked files:
(use "git add <file>..." to include in what will be committed)
filename
nothing added to commit but untracked files present (use "git add" to track)
[email protected]:~/Projects/temp$ echo filename > .gitignore
[email protected]:~/Projects/temp$ git status
On branch master
No commits yet
Untracked files:
(use "git add <file>..." to include in what will be committed)
.gitignore
nothing added to commit but untracked files present (use "git add" to track)
[email protected]:~/Projects/temp$
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question