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

This widget could not be displayed.

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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in Teamwork

What teamwork quotes inspire you?

Hey everyone! My name is Natalie and I'm an editor of the Atlassian Blog and I've got a question for you: What's your favorite quote about teamwork?  We've compiled a list here, along with...

89 views 13 7
Join discussion

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