maxxd Posted January 30, 2015 Share Posted January 30, 2015 Hey y'all - I have a quick question. [edit - As I type, it's becoming a not-so-quick question. Sorry about that, but I'd very much appreciate any input.] At work (we're on osX) we've recently switched to using Bitbucket with SourceTree for our version control system. I've got many project directories, already populated with working files. They're under SVN control, but honestly our SVN repo is a bit of a mess and I'm hoping to start over. My process for creating GIT repositories for each of these project directories using SourceTree is as follows: In the bookmarks window that pops up when I launch SourceTree, I click '+ New Repository' > 'Create Local Repository', then I use finder to navigate to the populated project directory and select it. I click 'Create Remote Repository', then click 'Create' to create the local repo. After filling out the remote repository owner and description, and marking it private, I click 'Create'. Then, in the browser window for the newly created repository that appears when I double click on the bookmark, I stage all the files in the local project directory and commit them. I then push that to the remote master branch. My question is this - is using the SourceTree 'Create Local Repository' option as described above equivalent to using the terminal window and 'git init' in the project directory? Everything seems to be working correctly (I've successfully committed and pushed files to the remote repositories), but I've only been using this setup for 2 days and haven't done any real heavy lifting with it yet - no branching or merging or anything of the sort. I have successfully cloned one of the repos on a secondary system, but haven't had a chance to make changes on that secondary system and commit then push them to make sure everything is actually working correctly. It certainly seems like all is well, and I have done more thorough testing on my home system, but that's a Windows box and the Windows version of SourceTree is quite different from the Macintosh version. Really, I decided to go with ST because I just don't like the command line and the price was right (free), and I'm trying to learn it as I go. I just don't want to be five or six months down the line and have to make a major change to a project only to discover that I messed up something very simple with the repository initialization and nothing's working like it should... Hopefully this is a dumb question and I'm just being paranoid, but I'd very much appreciate any input anyone with SourceTree experience has and is willing to offer. Quote Link to comment Share on other sites More sharing options...
requinix Posted January 30, 2015 Share Posted January 30, 2015 My question is this - is using the SourceTree 'Create Local Repository' option as described above equivalent to using the terminal window and 'git init' in the project directory?Sounds like it. If you're able to browse the repository locally and in BitBucket, and especially if you're able to clone it to another machine, then everything is working properly. Quote Link to comment Share on other sites More sharing options...
maxxd Posted January 31, 2015 Author Share Posted January 31, 2015 That's pretty much what I figured, but I always like to check with people who know better when I have the opportunity. Thanks so much! Quote Link to comment Share on other sites More sharing options...
ignace Posted January 31, 2015 Share Posted January 31, 2015 This way you are losing your commit history instead use git-svn which among other things can copy your commit history over to git. http://viget.com/extend/effectively-using-git-with-subversion It's also possible to commit in git and push to svn while you transition. Quote Link to comment Share on other sites More sharing options...
maxxd Posted January 31, 2015 Author Share Posted January 31, 2015 Thanks for the link, ignace - I'll give that a read this weekend! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.