I download code from a branch github by pressing download zip button then I unzip the file and make some change. Is there anyway i can push that code to the same repo as a new branch?
Asked
Active
Viewed 1,001 times
1 Answers
1
Create new branch: git checkout -b <name of branch>
Go to new branch: git checkout <name of branch>
Check status of files: git status
Add any files that have been changed: git add <files>
Commit files: git commit -m "<commit message>"
Push to GitHub: git push -u origin <name of branch>

Joshua Zeltser
- 488
- 2
- 9
-
-
-
i run git init and git remote add origin
and add new branch as you suggest and it works – May 18 '22 at 02:17