Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng github-pages:deploy deleted my project #3030

Closed
YonatanKra opened this issue Nov 5, 2016 · 5 comments · Fixed by #3378
Closed

ng github-pages:deploy deleted my project #3030

YonatanKra opened this issue Nov 5, 2016 · 5 comments · Fixed by #3378
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent type: bug/fix

Comments

@YonatanKra
Copy link

I've created a sample project, and then tried to upload it to github.
Instead of loading the project to github, it just deleted my local project completely - including the git commits, so there is no way back!
Any idea why this happened?
Here's the command I've used:
ng github-pages:deploy --message "First commit"

@johnazre
Copy link

johnazre commented Nov 5, 2016

Just did that to me too, but I had the --user-page flag, as well. Everything is there, though, other than the "src" directory.

I also keep getting this error:

Error: Command failed: git push origin gh-pages:master
To https://github.com/something/something.github.io.git
 ! [rejected]        gh-pages -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/something/something.github.io.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

    at ChildProcess.exithandler (child_process.js:206:12)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)

    at Socket.<anonymous> (internal/child_process.js:334:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:493:12)

@YonatanKra
Copy link
Author

My bad - it was indeed a different branch. Didn't notice it checked out a branch.
Now all is wel on my sidel :)

@filipesilva filipesilva added command: deploy P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent type: bug/fix labels Nov 16, 2016
rolyatsats added a commit to rolyatsats/angular-cli that referenced this issue Dec 3, 2016
If github-pages:deploy fails due to 'No changes found' or fails pushing to git repo, it then attempts to checkout the initial branch.

Closes angular#3030
rolyatsats added a commit to rolyatsats/angular-cli that referenced this issue Dec 3, 2016
If github-pages:deploy fails due to 'No changes found' or fails pushing to git repo, it then attempts to checkout the initial branch.

Closes angular#3030
rolyatsats added a commit to rolyatsats/angular-cli that referenced this issue Dec 3, 2016
If github-pages:deploy fails due to 'No changes found' or fails pushing to git repo, it then attempts to checkout the initial branch.

Closes angular#3030
Closes angular#2663
rolyatsats added a commit to rolyatsats/angular-cli that referenced this issue Dec 3, 2016
If github-pages:deploy fails due to 'No changes found' or fails pushing to git repo, it then attempts to checkout the initial branch.

Closes angular#3030
Closes angular#2663
rolyatsats added a commit to rolyatsats/angular-cli that referenced this issue Dec 3, 2016
If github-pages:deploy fails due to 'No changes found' or fails pushing to git repo, it then attempts to checkout the initial branch.

Closes angular#3030
Closes angular#2663
Closes angular#1259
hansl pushed a commit that referenced this issue Dec 5, 2016
If github-pages:deploy fails due to 'No changes found' or fails pushing to git repo, it then attempts to checkout the initial branch.

Closes #3030
Closes #2663
Closes #1259
@priyeshn
Copy link

priyeshn commented Feb 2, 2017

Getting "Failed to create GitHub repo. Error: 401 Unauthorized" when tries to deploys angular 2 app to my organization guthub page . Asking for a token and fails with 401

ng github-pages:deploy

? Please enter GitHub token you just created (used only once to create the repo):
? and your GitHub user name:
Failed to create GitHub repo. Error: 401 Unauthorized

@equinox
Copy link
Contributor

equinox commented Feb 2, 2017

@priyeshn You're commenting on a completely unrelated issue, and without full information also.

You should create a new issue, ensuring to fill out the template provided and including all relevant information.

You didn't include in your above comment whether or not you created the GitHub token -- might be worth adding that in.

MRHarrison pushed a commit to MRHarrison/angular-cli that referenced this issue Feb 9, 2017
If github-pages:deploy fails due to 'No changes found' or fails pushing to git repo, it then attempts to checkout the initial branch.

Closes angular#3030
Closes angular#2663
Closes angular#1259
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants