How do I commit new files to Git using SourceTree?

We use Visual Studio, and currently when we add new files to the project we cannot get them to show up in SourceTree in order to commit and push. Can you please provide some guidance on the best way to use Git/BitBucket/SourceTree with Visual Studio?

3 answers

1 accepted

After some testing, it seems to me the best option is to use VS 2012 and install the Git plugin. Add new files and commit in VS and then move back to source tree to push and make a pull request. I'd still love more comments or feedback from others though!

Hey Jason,

Perhaps this is because your filters weren't set up correctly? When looking at the 'Working copy' there's a filter next to the search box that'll say something like "Show pending". You'll want to make sure this filter is set to something that'll pick the files up when they're newly added.

Hope that helps

In Source Tree, the "Unstaged files" display should show any new files that you have moved into the source directories. You may have to do some scrolling to find them because the directories are not in alphabetical order. When you find the file(s), select them and then right-click and choose "Add". Now they are staged and you can commit and push them as if they already existed in the project.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

649 views 0 4
Read article

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