I try to deploy my Yeoman AngularJS static site to Github pages but the git subtree command always gets rejected -


i trying deploy angularjs static site (which began yeoman) github page , following steps provided in yeoman deployment guide. succeed in steps 1 , 2 when arrive @ step 3, things go bad. step 3 tells me run

git subtree push --prefix dist origin gh-pages 

when run see

$ git subtree push --prefix dist origin gh-pages git push using:  origin gh-pages git@github.com:siddhion/maxmythic_angular.git  ! [rejected]        5db3233d7c0822eedc5500409ce6a2d4b73ad427 -> gh-pages (non-fast-forward) error: failed push refs 'git@github.com:siddhion/maxmythic_angular.git' hint: updates rejected because pushed branch tip behind remote hint: counterpart. check out branch , merge remote changes hint: (e.g. 'git pull') before pushing again. hint: see 'note fast-forwards' in 'git push --help' details. 

i follow hint , try

$ git pull origin master github.com:siddhion/maxmythic_angular  * branch            master     -> fetch_head up-to-date. 

and tried git subtree push --prefix dist origin gh-pages again got same error before.

at yeoman deployment page see under some common errors section

you might error updates rejected because tip of current branch behind. can solve force pushing remote (be careful though, destroy whatever there).

i apprehensive force subtree push because new git in general , not sure going destroyed. mean, not have gh-pages branch @ maxmythic_angular origin remote not worried have master, gh-pages-old , gh-pages-v1 branches there. destroyed if run git subtree push --prefix dist origin gh-pages?

update

i went ahead , copied work folder safe , added --force git subtree push command , ran it. got

$ git subtree push --prefix dist origin gh-pages --force error: unknown option `force' usage: git subtree add   --prefix=<prefix> <commit>    or: git subtree add   --prefix=<prefix> <repository> <commit>    or: git subtree merge --prefix=<prefix> <commit>    or: git subtree pull  --prefix=<prefix> <repository> <refspec...>    or: git subtree push  --prefix=<prefix> <repository> <refspec...>    or: git subtree split --prefix=<prefix> <commit...>      -h, --help            show     -q                    quiet     -d                    show debug messages     -p, --prefix ...      name of subdir split out     -m, --message ...     use given message commit message merge commit  options 'split'     --annotate ...        add prefix commit message of new commits     -b, --branch ...      create new branch split subtree     --ignore-joins        ignore prior --rejoin commits     --onto ...            try connecting new tree existing 1     --rejoin              merge new branch head  options 'add', 'merge', 'pull' , 'push'     --squash              merge subtree changes single commit 

how can the git subtree push --prefix dist origin gh-pages command work can deploy site gh-pages?

update

i wanted see if issue instructions or fishy repo set new angular app yo angular , followed deployment instructions. git subtree push worked time. still have no idea happened gh-pages repo of mine. have learn git in , out.

i had same problem. problem had dist committed in current repo. no subtree. following steps should resolve issue

// remove dist , commit rd  /s dist git commit -am "remove dist folder" // add subtree , push git subtree add --prefix dist origin gh-pages git subtree push --prefix dist origin gh-pages 

that seemed trick me


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -