rohan
rohan

Reputation: 643

How do I push an angular-seed based project to my own git repo?

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?

Upvotes: 2

Views: 1408

Answers (2)

n4rush0
n4rush0

Reputation: 139

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

Upvotes: 0

chsue
chsue

Reputation: 21

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

Upvotes: 2

Related Questions