Pijus
Pijus

Reputation: 23

cloning existing repo and creating react-app

So I got a little bit confused. I have to clone a remote repo which contains only an asset folder. Create a new branch, work on it, and then push to that repo. The only problem is, I have to use creat-react-app. So my question is, what is the right order of git commands?

1. git clone "repository name" 
2. create-react-app .
3. git branch "branch name" 
4. git checkout "branch name" 
5. git push origin "branch name".

Please let me know if I'm thinking correctly. Many thanks in advance !!

Upvotes: 2

Views: 3037

Answers (1)

Tasnuva Leeya
Tasnuva Leeya

Reputation: 2795

after cloning:

  1. create a new branch and switch to the branch

  2. pull from origin to keep your branch up-todate

  3. create-react-app . add changes and commit

  4. push to remote branch

     1. git clone "repository name" 
     2. git checkout -b "branch name"
     3. git pull origin <default branch> # pull from origin to keep you up to date
     4. create-react-app .
     5. git add .
     6. git commit -m "your msg"
     7. git push origin "branch name"
    

Upvotes: 3

Related Questions