You will have the full history in three locations, you mac, your windows and your USB device. You can then work with Sourcetree, pull will get changes from your USB device, push will write them to your USB device. This is where Git stores the information about your remote bare repository and that's why it's important that you always mount it on the same folder/letter in the future. If you browse to myNewGame/.git/config you will see a section like this: įetch = +refs/heads/*:refs/remotes/origin/* Or you can do that to in Sourcetree, just pass it the location of your git repository on your USB device. On mac: $ git clone /Volumes/MyUsbDevice/myNewGame.git myNewGame On Windows: $ git clone Z:\myNewGame.git myNewGame What you need to do is create a clone of this repository on the machine where you want to work: That's probably why SourceTree is confused. The bare repository contains the history of your project in Git's binary format and your files are nowhere to be found there. (I just wanted to point out that you can always move your repositories around) $ cd /Volumes/MyUsbDevice/ Move your bare repository to your USB device (say, mounted on Z:\ or /Volumes/MyUsbDevice/), or create a new bare repository there. Many thanks in advance!! Any help will be very appreciated :) How do I get SourceTree to let me push/pull from the bare local repository into my local repository? Copying the bare repository into a USB drive would work to later pull from another computer repository? How do I get SourceTree to point at the bare repository I created? What I am trying to do is possible at all in git? I want to use SoruceTree since I need a Windows/Mac client to handle git on the different computers. The problem comes when I try to have SourceTree to recognize the bare repository, I couldn't achieve that.īut also I am a bit confuse, I can creare two different folders/respositories in my computer and link them to SourceTree, however SourceTree doesn´t let me push from one to the other, howcome? I have a local git project in my desktop, and then using the terminal (I work on MAC) I created a bare repository in the desktop in a different folder. I´ve been following this tutorial on achieve my goal: Since I never used git before and I want to lear, I am trying to do the same thing (I know you are not supposed to use git in this fashion, but I definitely don't want to host my project in any online server).Īfter reading quite a lot about git, I think I had a decent grasp on how it is different from SVN. In the past I had a SVN repository in a USB drive and use to update / commit from the local versions of the project in each computer. I work on the project alone but I use normally two different computers in different locations. I am new to git (although I work before with perforce and svn) and I would like to source control a Unity project but I don't want to host it anywhere online.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |