Source Code Management (Windows)


#1

I’ve tried a couple of the Git GUI programs GitKraken, SourceTree, SmartGit etc etc, but they seem to create a blank project. How do you use them with an existing JUCE project? Can anyone recommend a Windows friendly program they use and how to set it up with a JUCE project?

Been an annoyance for a while so any help would be great, thanks!


#2

Just create a blank, git-controlled folder with one of the tools mentioned above and create your JUCE project in that folder. If it already exists, you could rename your current project folder, then create the git-controlled folder with the original project folder name and copy the project over to that folder.

By the way: I really like git kraken as git gui since it gives the best overview what‘s happening in the repo in my personal opinion :wink:


#3

In source tree, creating a new git repo in a folder that isn’t empty then opening that repo in the program will show you all the files as “unstaged” so just select “stage all” and commit the new files to the repo.


#4

Thanks for your help, can you explain this step further? I don’t understand. I am using GitKraken by the way (because dark GUIs :heart_eyes: (and seems sourcetree sucks on windows))


#5

In order to understand that step, you need to understand what git init does. This Stack Overflow thread is a good place to start: https://stackoverflow.com/questions/13525629/understanding-git-init


#6

Thanks, I’ve read up on that now. Still pretty new to the whole git thing past push and pull…
I still don’t understand PluginPenguin’s reply though of which folders to rename what and put where. As far as I’ve got is making a new empty init folder


#7

Okay, lets say you created the JUCE project MyGreatApp before you wanted to put it under git control. The whole project will be located into a folder with the name MyGreatApp. Now rename this folder containing the project to some name of your choice, let’s say MyGreatApp_NoGit. After that create an empty git controlled folder with a tool of your choice and call it MyGreatApp. After that copy the whole content of MyGreatApp_NoGit into MyGreatApp. Delete MyGreatApp_NoGit afterwards.

However, I never do it like that, I normally start with empty projects created by my Git server and then create the project into it. But to do some tests, I just opened GitKraken and found out that you could just choose File->Init Repo and then choose your folder already containing a project. This worked perfectly for me. Have you tried that without success?

And by the way:

I like the white GUI setting of GitKraken a lot better, check it out! :smiley:


#8

I tried this way initially and get a ‘can’t do this because the folder isn’t empty’ type error. Not sure what we’re doing differently. But that’s ok because…

This works! Thanks a lot. I’ll do it from blank in future when I make new projects.

(for future readers) Another step when using the whole project folder as the repo, is to stop checking the build etc. folder. Using GitKraken the folder will show in unstaged files when you put it on tree view.

Damn pretty nice, makes it clearer to see what’s going on, but it burns my eyes :sunglasses: