Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Cannot commit all changes

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

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

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
Community showcase
Published in Bitbucket

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

117 views 2 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you