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 !!
after cloning:
create a new branch and switch to the branch
pull from origin to keep your branch up-todate
create-react-app . add changes and commit
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"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.