# Source Code Management (Windows)

**URL:** <https://forum.juce.com/t/source-code-management-windows/27007>\
**Category:** General JUCE discussion\
**Created:** [March 29, 2018, 2:00pm UTC](https://forum.juce.com/t/source-code-management-windows/27007 "2018-03-29T14:00:02Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![vincent](https://avatars.discourse-cdn.com/v4/letter/v/e9bcb4/32.png) [@vincent](https://forum.juce.com/u/vincent)\
**Post date:** [March 29, 2018, 2:00pm UTC](https://forum.juce.com/t/source-code-management-windows/27007/1 "2018-03-29T14:00:02Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![PluginPenguin](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/pluginpenguin/32/10203_2.png) [@PluginPenguin](https://forum.juce.com/u/PluginPenguin)\
**Post date:** [March 29, 2018, 2:13pm UTC](https://forum.juce.com/t/source-code-management-windows/27007/2 "2018-03-29T14:13:07Z")

</div>

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 😉

---

<div class="post-metadata">

**Author:** ![holy-city](https://avatars.discourse-cdn.com/v4/letter/h/8491ac/32.png) [@holy-city](https://forum.juce.com/u/holy-city)\
**Post date:** [March 29, 2018, 10:44pm UTC](https://forum.juce.com/t/source-code-management-windows/27007/3 "2018-03-29T22:44:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![vincent](https://avatars.discourse-cdn.com/v4/letter/v/e9bcb4/32.png) [@vincent](https://forum.juce.com/u/vincent)\
**Post date:** [March 31, 2018, 5:07pm UTC](https://forum.juce.com/t/source-code-management-windows/27007/4 "2018-03-31T17:07:40Z")

</div>

> [@PluginPenguin](#):
>
> 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.

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

---

<div class="post-metadata">

**Author:** ![mcmartin](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/mcmartin/32/7432_2.png) [@mcmartin](https://forum.juce.com/u/mcmartin)\
**Post date:** [March 31, 2018, 10:26pm UTC](https://forum.juce.com/t/source-code-management-windows/27007/5 "2018-03-31T22:26:29Z")

</div>

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](https://stackoverflow.com/questions/13525629/understanding-git-init)

---

<div class="post-metadata">

**Author:** ![vincent](https://avatars.discourse-cdn.com/v4/letter/v/e9bcb4/32.png) [@vincent](https://forum.juce.com/u/vincent)\
**Post date:** [April 1, 2018, 10:35am UTC](https://forum.juce.com/t/source-code-management-windows/27007/6 "2018-04-01T10:35:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![PluginPenguin](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/pluginpenguin/32/10203_2.png) [@PluginPenguin](https://forum.juce.com/u/PluginPenguin)\
**Post date:** [April 1, 2018, 7:34pm UTC](https://forum.juce.com/t/source-code-management-windows/27007/7 "2018-04-01T19:34:59Z")

</div>

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:

> [@vincent](#):
>
> I am using GitKraken by the way (because dark GUIs 😍)

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

---

<div class="post-metadata">

**Author:** ![vincent](https://avatars.discourse-cdn.com/v4/letter/v/e9bcb4/32.png) [@vincent](https://forum.juce.com/u/vincent)\
**Post date:** [April 3, 2018, 10:33am UTC](https://forum.juce.com/t/source-code-management-windows/27007/8 "2018-04-03T10:33:40Z")

</div>

> [@PluginPenguin](#):
>
> 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?

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…

> [@PluginPenguin](#):
>
> 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.

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.

> [@PluginPenguin](#):
>
> And by the way:
> 
> > [@vincent](#):
> >
> > I am using GitKraken by the way (because dark GUIs 😍)
> 
> I like the white GUI setting of GitKraken a lot better, check it out! 😃

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