For an IC design class I am taking we have to VNC into a linux server to access the tools and design out circuitry and test benches. Originally I just had one repository that I was pushing everything to but we have started working on a project in groups and the best way to distribute the designs among everyone appears to be through Git. I need a way to separate my class directory into two separate repositories.
File Structure
class
├── Lib
| ├── inverter
| ├── nand2
| ├── nor2
| └── proj
└── LibTest
├── inverter
├── nand2
├── nor2
└── proj
Desired Project Repository
class
├── Lib
| └── proj
└── LibTest
└── proj
Desired Lab Repository
class
├── Lib
| ├── inverter
| ├── nand2
| └── nor2
└── LibTest
├── inverter
├── nand2
└── nor2
I can't really find a way to make this happen unless maybe I have my main repository in the class
directory and create two separate repositories for Lib\proj
and \LibTest\proj
but I would really like it if the two project directories were tied together, as if they were in the same repository.
Update
2016-12-02 02:10 PM CST
Okay, so I setup two separate git repositories within class and renamed them to .gitproj
& .gitlab
.
git init
mv .git .gitlab
git init
mv .git .gitproj
I then modified the /info/exclude
file to exclude those directories and isolate the lab directories within the lab repo and the proj directory within the proj repo.
.gitlab/info/exclude
# Ignore git directories
.git*
!.gitignore
# Ignore project directories
Lib/proj
LibTest/proj
.gitproj/info/exclude
# Ignore git directories
.git*
!.gitignore
# Ignore everything under Lib and LibTest
Lib/*
LibTest/*
# Unignore proj directories
!Lib/proj
!LibTest/proj
Finally, I added aliases to my .bashrc file. Using Git-Bash for Windows it was the /etc/bash.bashrc
file.
alias gitl='git --git-dir=.gitlab'
alias gitp='git --git-dir=.gitproj'