2

So I made a small web app based off of the Angular-Seed project on my local machine. I cloned it from Github and made the project, no problem.

I added all the files/directories without issue, after I deleted the .git directory and .gitignore file from the angular-seed root directory. Running a git status the console reads:

On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean

However when I add, commit and push to my remote repository, the angular-seed directory (along with the rest of the project files) does not show up.

The directory map looks like /home/user/my-local-repo/angular-seed/ where all the project files are in the angular-seed directory. Can somebody please help me?

rohan
  • 523
  • 1
  • 5
  • 22

2 Answers2

2

git clone --depth=1 {angular seed repo link} mynewproject

cd mynewproject

rm -rf .git

git init

git remote add origin {repo link}

source: https://github.com/angular/angular-seed/issues/239

You might then get a src refspec error, one solution for that is:

Maybe you just need to commit. I ran into this when I did:

mkdir repo && cd repo git remote add origin /path/to/origin.git git add . Oops! Never committed!

git push -u origin master error: src refspec master does not match any. All I had to do was:

git commit -m 'initial commit' git push origin master Success!

source: src refspec master does not match any when pushing commits in git

Community
  • 1
  • 1
chsue
  • 21
  • 2
0

Removing the directory from git and adding it again, like this:

git rm --cached directory
git add directory

Source: Git: fatal: Pathspec is in submodule

Wilson Vargas
  • 2,841
  • 1
  • 19
  • 28
n4rush0
  • 119
  • 1
  • 2
  • 8