Git setup for new repo
Assuming TGT_DIR will be the repository dir
- cd $TGT_DIR
- git init
- git add {files to add}
- git commit -m "First Commit"
- git remote add origin {https://github.com/.....}
- git config credential.helper store
- git fetch
- git merge origin/master --allow-unrelated-histories
- git push origin master
Merging with upstream repo
- cd $TGT_DIR
- git remote add upstream https://github.com/--fork repo --
- git remote -v
- git fetch upstream
- git merge upstream/master
- See this
if anything went wrong try this .... git reset