How do I commit changes locally that I don't want pushed to the repo?

I have made changes to files in my working copy that are specific to just this project, and now I want to commit these changes, but in this project only. If I commit these changes, the commit shows up in push. How do I prevent them being pushed back to the repo?

1 answer

1 accepted

Accepted Answer
0 votes

Hi Fred!

you can commit your changes without pushing it to anywhere else. You git-client should not do this automatically. I don't know what you mean by "specific to just this project", maybe it's a good idea to create a branch and commit you changes only to this branch without merging to you main branch ("master").

Hope this helps.

Hi Mirko,

Thanks for responding. My repo contains general files that are common to all projects, however, each project will customize some of those files and those changes should never go back to the repo. I think my confusion came from not realizing that working copy changes could be applied to any branch. What I mean is, I thought that if I had Master checked-out when I made changes, those changes would only be available for committing in the branch they were created in. Now I see that I can pick and choose which changes are committed in which branch.

I have done as you suggested and created a branch to commit the changes only in my local project. Thanks for the reply

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Featured Groups

Tuesday tips & tricks: What is the Atlassian Community?

It's officially Tuesday, which means it's officially time for another tip to help you better navigate this space we call the Atlassian Community. 😄 I got a great question from community member, Sa...

152 views 6 8
View post

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you