How do you push from nitrous.io to git

I followed this guide Acidation to Heroku Guide

It describes the process for viking git repo, but I want to push my directory to git and then to Heroku. Well, I really wanted to just push my things to Herek. Argh now i'm lost.

So, either click directly on Heroku, or on git, and then on Heroku.

Links to textbooks are always welcome if I missed something.

Thanks in advance.:)

+6
source share
2 answers

You will need to add two remotes to the same project.

Initiate your project for Git

$ git init 

To add remote Github to the project and click:

 $ git remote add origin https://github.com/user/repo.git # Set a new remote $ git remote -v # Verify new remote # origin https://github.com/user/repo.git (fetch) # origin https://github.com/user/repo.git (push) $ git add . $ git commit -m "initial commit" $ git push origin master 

To create a new Heroku project and push the remote into your project:

 $ heroku create $ git remote -v # Verify new remote (you will see heroku and origin now # heroku git@heroku.com :falling-wind-1624.git (fetch) # heroku git@heroku.com :falling-wind-1624.git (push) # origin https://github.com/user/repo.git (fetch) # origin https://github.com/user/repo.git (push) $ git push heroku master 

This is the standard strategy that you will each time want to git add, commit, and then click on origin master (Github) and heroku master (Heroku).

+14
source

If you have local data in your Nitrous Box, which is not a git repository yet, you need to do the following:

 cd /path/to/stuff git init git add . git commit -m "Make stuff into a git repo" 

From there, you can follow the steps described in the tutorial that you mentioned in your question , with the exception of step 7: you do not need to clone the repo since you just created it.

+2
source

Source: https://habr.com/ru/post/954055/


All Articles