After doing some tests, I've managed to clean up one issue I was having, but not the big one. Anyways, I'd figured re-writing the thread would be the best option to include new details.
Essentially, I am trying to setup my workspace to contain different projects (which are essentially one project, just different versions of Forge). For example, I have a main modding directory, and inside, I have some miscellaneous projects I'm working on, along with my main project, which is a folder, with two more projects inside (one for 1.7.10, and one for 1.8).
Previously, I just had one project, which included the hidden .git folder the GitHub uses to keep track of changes. So, I created two folders each for the new projects, copied over files, and left the .git folder in the folder which holds the two projects. I feel like this is the cause of my issue, however, I'm not sure.
So, having setup everything, everything seems to work, until I pull up the GitHub client (I am on a Mac by the way), create new branches, push the new 1.8 changes to a 1.8 branch, push any new updates to the 1.7.10 branch (which is now the default branch). However, for some reason, once I changed branches in the GitHub client to the 1.7.10 branch, the src folder in the 1.7.10 project gets removed for some reason. It seems to be only happening with the 1.7.10 branch/project, but it's happened with the 1.8 project before.
Does anyone know of a solution to any problems, or a way to identify the problem?
After some more trial and error, it happens with both versions. For instance, say the 1.7.10 project src is missing. I'll sync up with GitHub to retrieve the missing source, however, it then deletes the 1.8 project src, and vice versa! One thing I've noticed it could be the .gitignore file, as it is different for each branch. Could that be a potential problem?
I'm just trying to understand your setup, as I have something similar to do multiple projects.
So you have Forge 1.7.10 in your main modding directory and also the 1.8.x Forge also right? And when you open Eclipse Workspace, you see both of those as separate projects, along with the two 1.7.10 & 1.8.x projects for your Mod, right?
That is how I have things configured. For each project I then add whichever Forge version it is using as a project (a sub project or dependent project, I think it is called).
Now I don't make setup any of my project folders under my main modding directory as local repositories, but seems like that should work.
You have each of the repositories in Windows GitHub as separate repositories, right? It doesn't matter that one is the branch of the other, I think they still need to be listed in there separately.
This folder is my main modding workspace on my Desktop. Inside, I have some miscellaneous projects, a run folder which stores all data like saves and such, and the Ascension folder. You can see inside that folder that I have 4 files included in my repo, a couple folders for extra storage, and two project folders, one for 1.7.10, and one for 1.8.
When I open Eclipse, I have 3 projects, one for another small project of mine, and two projects for Ascension, one for 1.7.10, and one for 1.8. Instead of having a forge folder, I just copy the necessary files/folders into that project folder.
My local repository folder is the Ascension folder (the one that holds the two project folders, and additional stuff).
As for how they look in the GitHub client, I only have one repository, the Ascension repository, like so:
Here, I just switch branches I'm pushing to from 1.7.10 to 1.8. Each branch has its own .gitignore file, so I can easily just ignore the other project from mixing the two code. This is what I'm thinking could be causing the src folders to get deleted, but I could be wrong.
I think that is the problem (having only one repository for two branches). GitHub is essentially converting it back and forth between the two. You need to have two separate local repositories, one for 1.7 and one for 1.8.
BTW, I also think you would be better off putting all your projects at the same level in the folder structure. Don't use subdirectories, but that is just how I prefer to do it, I would have an Ascension-1.7, Ascension-1.8, and Forge-1.7 and Forge-1.8 folders all in the same folder.
In the above, I don't see where you have put Forge at all though.
Alright. The reason I did it this way was because the Ascension folder you see about has the hidden .git folder which is tied to the GitHub repo, instead of having to re-setup the local repository.
One thing I'm confused about is how you would setup two local repositories for one repository on GitHub.
As for Forge, the forge files are inside the Ascension-Version projects (everything but the eclipse and .txt files).
Ok, first off, the Forge files should not be inside the Ascension projects. Say you have 10 mods, 7 using Forge 1.7.10, 3 using 1.8, that would be 10 copies of Forge. Now say one of those you want to upgrade from Forge 1.7.10 1230 to 1291 (I made up those numbers), but leave the rest alone).
If you have the Forge folders outside of the project, you have 2 copies, not 10. For the upgrade, you simply add a 2nd copy of 1230, change the project to use that instead, then edit the gradle for the 2nd copy, run the command to upgrade it, 10 minutes later you are set to go. It is very quick to change a project to use a different Forge, it is just a setting. If you are going from 1.7.10 1230 to 1291, it is like a minute.
Likewise when you add a new project, just a minute to set it to use Forge, no need to copy Forge into it. Also you don't have to set the .gitignore to not put Forge in the repository as it was never in there to begin with.
OK, on to the 2nd thing. You setup the 2nd repository same way you setup the first. You add it in Windows GitHub, you set the remote to be the http address of the remote repository, you set the location of it on the file system. Same way as always.
The way I've setup Forge allows me to do exactly the same thing. All I have to do is specify which version I want to use in the build.gradle file, run the setup commands, and you are good to go. In my opinion, having each project have their own Forge version is really preferable.
So regarding the repository, this is where I'm getting tripped up. If I created a repository locally, how would I push changes one that repository to go to a branch in a repository on GitHub?
Not sure what you mean by creating a repository locally.
For you to use any repository in the GitHub site, you must always have a corresponding local repository. When you selected Clone in the Windows GitHub program, it created your local repository that corresponds to the remote repository on the GitHub server.
Every time you make a change in your local repository or there is a change in the remote repository, when you open the Windows GitHub program, and select the repository, it will either sync up the local files to the remote repository or prompt you to check-in your changes from the local repository to put them into the remote repository.
So I assume (I don't have my Eclipse project folder and local repository folder as the same folder), that you could see files added to your Eclipse project when GitHub does this sync. This could very well break you build, so you would need to be careful when you do this.
So once again, you have two separate repositories. A branch of the master repository is a separate repository just like any other repository. It is just linked to its master.
Alright, I believe I got everything setup again. Right now, I have two separate repositories in the client, which are both tied to the GitHub repository. Correct?
After doing some tests, I've managed to clean up one issue I was having, but not the big one. Anyways, I'd figured re-writing the thread would be the best option to include new details.
Essentially, I am trying to setup my workspace to contain different projects (which are essentially one project, just different versions of Forge). For example, I have a main modding directory, and inside, I have some miscellaneous projects I'm working on, along with my main project, which is a folder, with two more projects inside (one for 1.7.10, and one for 1.8).
Previously, I just had one project, which included the hidden .git folder the GitHub uses to keep track of changes. So, I created two folders each for the new projects, copied over files, and left the .git folder in the folder which holds the two projects. I feel like this is the cause of my issue, however, I'm not sure.
So, having setup everything, everything seems to work, until I pull up the GitHub client (I am on a Mac by the way), create new branches, push the new 1.8 changes to a 1.8 branch, push any new updates to the 1.7.10 branch (which is now the default branch). However, for some reason, once I changed branches in the GitHub client to the 1.7.10 branch, the src folder in the 1.7.10 project gets removed for some reason. It seems to be only happening with the 1.7.10 branch/project, but it's happened with the 1.8 project before.
Does anyone know of a solution to any problems, or a way to identify the problem?
After some more trial and error, it happens with both versions. For instance, say the 1.7.10 project src is missing. I'll sync up with GitHub to retrieve the missing source, however, it then deletes the 1.8 project src, and vice versa! One thing I've noticed it could be the .gitignore file, as it is different for each branch. Could that be a potential problem?
I'm just trying to understand your setup, as I have something similar to do multiple projects.
So you have Forge 1.7.10 in your main modding directory and also the 1.8.x Forge also right? And when you open Eclipse Workspace, you see both of those as separate projects, along with the two 1.7.10 & 1.8.x projects for your Mod, right?
That is how I have things configured. For each project I then add whichever Forge version it is using as a project (a sub project or dependent project, I think it is called).
Now I don't make setup any of my project folders under my main modding directory as local repositories, but seems like that should work.
You have each of the repositories in Windows GitHub as separate repositories, right? It doesn't matter that one is the branch of the other, I think they still need to be listed in there separately.
[url=2482915-wip-arkcraft-survival-evolved-dinos-taming]
Here is a visual of my folder hierarchy:
This folder is my main modding workspace on my Desktop. Inside, I have some miscellaneous projects, a run folder which stores all data like saves and such, and the Ascension folder. You can see inside that folder that I have 4 files included in my repo, a couple folders for extra storage, and two project folders, one for 1.7.10, and one for 1.8.
When I open Eclipse, I have 3 projects, one for another small project of mine, and two projects for Ascension, one for 1.7.10, and one for 1.8. Instead of having a forge folder, I just copy the necessary files/folders into that project folder.
My local repository folder is the Ascension folder (the one that holds the two project folders, and additional stuff).
As for how they look in the GitHub client, I only have one repository, the Ascension repository, like so:
Here, I just switch branches I'm pushing to from 1.7.10 to 1.8. Each branch has its own .gitignore file, so I can easily just ignore the other project from mixing the two code. This is what I'm thinking could be causing the src folders to get deleted, but I could be wrong.
I think that is the problem (having only one repository for two branches). GitHub is essentially converting it back and forth between the two. You need to have two separate local repositories, one for 1.7 and one for 1.8.
BTW, I also think you would be better off putting all your projects at the same level in the folder structure. Don't use subdirectories, but that is just how I prefer to do it, I would have an Ascension-1.7, Ascension-1.8, and Forge-1.7 and Forge-1.8 folders all in the same folder.
In the above, I don't see where you have put Forge at all though.
[url=2482915-wip-arkcraft-survival-evolved-dinos-taming]
Alright. The reason I did it this way was because the Ascension folder you see about has the hidden .git folder which is tied to the GitHub repo, instead of having to re-setup the local repository.
One thing I'm confused about is how you would setup two local repositories for one repository on GitHub.
As for Forge, the forge files are inside the Ascension-Version projects (everything but the eclipse and .txt files).
Ok, first off, the Forge files should not be inside the Ascension projects. Say you have 10 mods, 7 using Forge 1.7.10, 3 using 1.8, that would be 10 copies of Forge. Now say one of those you want to upgrade from Forge 1.7.10 1230 to 1291 (I made up those numbers), but leave the rest alone).
If you have the Forge folders outside of the project, you have 2 copies, not 10. For the upgrade, you simply add a 2nd copy of 1230, change the project to use that instead, then edit the gradle for the 2nd copy, run the command to upgrade it, 10 minutes later you are set to go. It is very quick to change a project to use a different Forge, it is just a setting. If you are going from 1.7.10 1230 to 1291, it is like a minute.
Likewise when you add a new project, just a minute to set it to use Forge, no need to copy Forge into it. Also you don't have to set the .gitignore to not put Forge in the repository as it was never in there to begin with.
OK, on to the 2nd thing. You setup the 2nd repository same way you setup the first. You add it in Windows GitHub, you set the remote to be the http address of the remote repository, you set the location of it on the file system. Same way as always.
[url=2482915-wip-arkcraft-survival-evolved-dinos-taming]
The way I've setup Forge allows me to do exactly the same thing. All I have to do is specify which version I want to use in the build.gradle file, run the setup commands, and you are good to go. In my opinion, having each project have their own Forge version is really preferable.
So regarding the repository, this is where I'm getting tripped up. If I created a repository locally, how would I push changes one that repository to go to a branch in a repository on GitHub?
Not sure what you mean by creating a repository locally.
For you to use any repository in the GitHub site, you must always have a corresponding local repository. When you selected Clone in the Windows GitHub program, it created your local repository that corresponds to the remote repository on the GitHub server.
Every time you make a change in your local repository or there is a change in the remote repository, when you open the Windows GitHub program, and select the repository, it will either sync up the local files to the remote repository or prompt you to check-in your changes from the local repository to put them into the remote repository.
So I assume (I don't have my Eclipse project folder and local repository folder as the same folder), that you could see files added to your Eclipse project when GitHub does this sync. This could very well break you build, so you would need to be careful when you do this.
So once again, you have two separate repositories. A branch of the master repository is a separate repository just like any other repository. It is just linked to its master.
[url=2482915-wip-arkcraft-survival-evolved-dinos-taming]
Alright, I believe I got everything setup again. Right now, I have two separate repositories in the client, which are both tied to the GitHub repository. Correct?