Adding an Existing Repo that Has a Corresponding Remote to SourceTree. For some reason if you click 'Clone' next to a repo you already have on your local machine and select the existing directory, it won't connect the remote repo with your existing copy. You can either clone it to a new location, or add the directory manually in the Local tab. Sourcetree for Windows 2019 Preview By Brian Ganninger on January 17, 2019. Throughout the past year we listened carefully to all our Windows users and we’re excited to bring you the two most highly requested features in 2019! Current utc time with seconds. In this post we’ll take a sneak peek and provide visibility into what you can expect soon. Our top request for Sourcetree for Windows is a “non retina.
July 8th, 2015
So you may ask yourself “What is the big deal about removing an unwantedrepository in Sourcetree with
Command Line?I mean, like, I remove unwanted local repositories all the time!” Well, the kindof unwanted local repository I’m talking about is the kind that incorporates allthe files in your computer. “But how is that possible?” you may ask. I’ll tellyou.
I am still fairly new to Sourcetree, but havebecome much more familiar with it as a result of a “brain fart” I experiencedlast week. I forgot to drag the folder I wanted to track into theSourcetree bookmarks window. Instead, Icreated a new repository directly in the bookmarks window.
Take a look at the image of the Sourcetreebookmarks window located above. There you will see a tab called “NewRepository”. If you create a repository in that way, you will also be creating alocal git (or mercurial) repository at the same time, AND it will by defaultcreate a path from your home directory. And as we all know, that is where allthe files on our computer reside! I had a brain fart and created my repositoryin this way instead of dragging a folder from one of my local installs into thebookmarks window. When you drag a folder into the bookmarks window,Sourcetree immediately recognizes the path tothat folder, which is really cool. Not so cool when you inadvertently create therepository within the bookmarks window.
So what is a girl to do when her whole computer resides in aSourcetree repository? First of all, I didNOTHING with this repository. Luckily, I immediately realized my mistake.Luckily, I realized that I shouldn’t take any kind of action. In other words, Ishouldn’t track anything. I shouldn’t commit anything. I should do NOTHING untilI learned how to get rid of it. That was the only thing to do here. And I alsoknew that I had to exhibit extreme patience. I knew that there was definitely away out of my dilemma. I just didn’t know how to get out of it myself. I left amessage on the Atlassian Forums regarding mydilemma, and I RSVPed to a Hacker Hoursmeetup (which I attended yesterday) just in case.
I didn’t receive any response to my dilemma from Atlassian Support. Ireceived an automated message indicating receipt of my email, but that was it. Ireceived a response from someone in the Forums with a possible solution, but wasnot able to respond to his response! I had made a total combination of 3questions/comments in the Forums, so I wasn’t able to initiate any more activitythere until I accumulated 25 points. “How retarded is that?” I told myself. Ihad this major issue I had to resolve, and there was no way for me tocommunicate with anyone in the Forum! I prayed hard that someone would be ableto help me at Hacker Hours.
Lo and behold, I overheard a conversation about
Command Line going on behindme during Hacker Hours, and I knew that Iwas in the right place. Jasmine, the meetup lead, showed me how to get rid ofthe local
.git I had inadvertently created with my home directory inSourcetree using
Sourcetree Local Repository
Basically, this command gets rid of the local
.git folder that’s created whenyou create local
.git repositories. When you get rid of this folder,Sourcetree will no longer recognize therepository associated with that folder. The downside is that if you have otherlocal repositories that you have created in the same location, you will losethem as well. What made it so easy for me to get rid of my local
.gitrepository was that I hadn’t tracked any files, and I hadn’t committed anything.In addition, I hadn’t created any other local
.git repositories on mycomputer. Only this one. All my other repositories were created via drag anddrop, and therefore were not local
.git repositories. They were just localrepositories that I hadn’t connected to any remote repositories either.
I took away a couple of very important things from this experience:
Be patient. Being impatient or impulsive will only lead to disaster. If youaren’t sure about how to rectify a situation, wait until you come across thesure fire solution. Better yet, wait until you come across an opportunity toresolve your issue face-to-face with people who know what they are doing.
If you are lucky enough to immediately recognize that you’ve made a mistake,DON’T DO ANYTHING. Just let the repository sit there until you have theappropriate knowledge to remove it. Don’t be tempted to track anything justbecause. Don’t be tempted to commit anything just because. Just forget aboutit, just because!
To add your supply request file, do the following:
Sourcetree Local Stores
Sourcetree Local Ignore
From your BitbucketStationSupplies in Bitbucket, click Source to open the source directory. Notice you only have one file,
supplies.txt, in your directory.
A. Source page: Click the link to open this page.
B. Branch selection: Pick the branch you want to view.
C. More options button: Click to open a menu with more options, such as 'Add file'.
D. Source file area: View the directory of files in Bitbucket.
From the Source page, click the More options button in the top right corner and select Add file from the menu. The More options button only appears after you have added at least one file to the repository. A page for creating the new file opens, as shown in the following image.
A. Branch with new file: Change if you want to add file to a different branch.
B. New file area: Add content for your new file here.
Enter supplyrequest in the filename field.
Select HTML from the Syntax mode list.
Add the following HTML code to the text area:
We are requesting additional supplies. Please send us the following:
- space ice cream
- nerf darts
- telescope light shield
Click Commit. The Commit message field appears with the message:
supplyrequest created online with Bitbucket.
Click Commit under the message field.