I've never worked with git before this project I'm trying to get going, so please bear with me.
Basically, my team is starting a new project in our own git repo which will have other github projects as dependencies. We expect we will have to do edits on those dependencies which we want to push back to our own repo so everyone on the team can sync them. We would also like to take updates to the dependencies from the original GitHub repo as we would like to eventually push back the changes in our repo to GitHub. Does this make sense so far?
Ok, so the way I wanted to lay out our project is something like follows:
root
|- src <- Our code goes here
|- upstream <- GitHub dependencies go under here
|- GitHub project A
|- GitHub project B
So I thought the way one goes about doing this is to for each GitHub dependency, git clone
the GitHub repo to the desired directory, and then git remote set-url origin <our repo url>
and then git remote add upstream <original github url>
. I thought then I'd be able to make changes, add, commit and finally push to our repo. And when desired, pull from the upstream remote to keep stuff up to date.
Unfortunately this didn't quite work out, after I did git add .
from root
, doing git status -s
would not show the files in the GitHub directories as added. Doing a commit and push put things in what looked like a half baked state and then I started stressing out because I have no idea what I'm doing.
So if anyone can share some help I would greatly appreciate it, but please talk to me like I'm five years old.