Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Cannot commit all changes

russell fleming July 23, 2020

I am new to Bitbucket. Being a Subversion expert is not helping me at all. Something as basic as commiting changes is not intuitive for me.

I have made changes to 2 existing files and added one new file - 3 total.

According to manual "commit" is actually a concept done in two steps. First commit, then push.

I did a commit -m "message" as shown.

I get a confusing dialog back with two sections that implies commit is not commit but ok. 

Changes to be committed:
(use "git restore --staged <file>..." to unstage)

Changes not staged for commit:
(use "git add <file>..." to update what will be committed)

So my new file is is in the first section and the 2 files I changed are in the second section.

Problem, when I do a push only the new file is sent to the repository. The changed files are not being committed.

The help file says try a commit -a but this opens up a window editor for which I cannot find any help on.

I'm just looking for a method to use consistently that "commits" changes. To me changes has always meant new and modified files. I do not want to treat them differently but do not know the proper steps.

 

1 answer

1 vote
Christian Glockner
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 26, 2020

Hi Russell,

Actually there are three steps:

  1. Stage the files by running git add <filename> (or git add . (that's a dot) to add all files)
  2. Commit
  3. Push

Based on what you're saying you'll just need to run git add . before running git commit to be sure that all files you added or modified will be committed.

Cheers,

Christian

Premier Support Engineer

Atlassian

Soldier October 19, 2020

Hi Christian,

One more comment, when I check out a file & folder content and submit this version, but another also check out this file & folder at the same time, submitting that version, if both submit those version, then how can others get the correct version?

Or how can we edit one file at the same time, and submit to the Bitbucket?

Thanks for your support.

BR,

Soldier

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events