How to set the root application directory?

I have created my first droplet, but I don’t know how to set the root application directory?
I tried to create a folder for my app name in /home/dokku/app_name
Then, I did cd app_name and then git init
Then I added a remote repo:

git remote add dokku root@do.mydomain.com:app_name

But, when try to push I get error:

  • can't deploy git repository to dokku instance (fatal: {reponame} does not appear to be a git repository)
  • How do I push a play! framework java application to a Dokku in Digital Ocean droplet?
  • Jenkins Installation Wizard Error
  • Dokku push resulting in broken pipe when deploying to Digital Ocean
  • How do I push my git repository to dokku?
  • Access node app on digital ocean - This site can't be reached
  • fatal: 'app_name' does not appear to be a git repository
    fatal: The remote end hung up unexpectedly
    

    How to configure this? How to set the root application directory?

  • Amend a git rebase
  • “Will not add file alias 'samefile' ('SameFile' already exists in index)” when `git add` operation
  • How to see the change during a 'merge conflict' in git rebase
  • VS Code configuring Git Sync
  • Searching code in a specific github Branch
  • Get # of commits in current branch with bash script
  • One Solution collect form web for “How to set the root application directory?”

    Follow the following steps if you haven’t:

    (on server)

    1. Login to server as root. cd ~ (Go to home dir of root)
    2. cd app_name
    3. git init --bare (It should give you message that it initialized a git repo)

    (Local System)

    1. cd app_name
    2. git init (It should give you message that it initialized a git repo)
    3. git add . (to stage all files in current dir to commit)
    4. git commit
    5. git remote add dokku root@do.mydomain.com:app_name
    6. git push dokku master (first time you need to9 give the name of branch to push as remote repo does not have any branch of itself yet.

    Hope this solves your prob!

    Git Baby is a git and github fan, let's start git clone.