cannot commit

Asked by Nitesh Mistry

I created a directory and gave "bzr init" to initiate bzr.
Then I added a few folders and a file and give 'bzr commit -m "adding some files and folders"'

but it gives back the following error:
aborting commit write group: PointlessCommit(No changes to commit)
bzr: ERROR: No changes to commit. Use --unchanged to commit anyhow.

after doing 'bzr commit -m "adding some files and folders" --unchanged'
if I give 'bzr diff' it does not show anything

Am I missing something?

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
David Roberts
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
Best David Roberts (smartgpx) said :
#1

The minimum steps needed to version control some files are -
bzr init
 (touch or edit the files you want to control)
bzr add
bzr commit -m "message"

I think you might have missed the 'bzr add' step?

Revision history for this message
David Roberts (smartgpx) said :
#2

>> after doing 'bzr commit -m "adding some files and folders" --unchanged'
>> if I give 'bzr diff' it does not show anything

'bzr diff' tells you what has changed since the last commit. So a null response to diff is what is to be
expected immediately after a commit.

Revision history for this message
Nitesh Mistry (mistrynitesh) said :
#3

Thanks David Roberts, that solved my question.

Revision history for this message
Nitesh Mistry (mistrynitesh) said :
#4

Just want to know, if I need to give this command every time before I commit (after editing files)

Revision history for this message
David Roberts (smartgpx) said :
#5

'bzr add' places (recursively) the files in your directory tree under bzr version control (other than any you have chosen to ignore.) You can only 'add' a particular file once, to make it 'versioned', so you don't do it again after editting that file. But if you create any new files you have to 'bzr add' them to include them in version control.

You should probably have a look at some of the tutorials available at
 http://doc.bazaar.canonical.com/bzr.2.0/en/tutorials/

Revision history for this message
Nitesh Mistry (mistrynitesh) said :
#6

Thanks David Roberts, that solved my question.

Revision history for this message
Nitesh Mistry (mistrynitesh) said :
#7

Sorry for confirming so late :)