Reputation: 7121
I want to create a new branch, get a repository, change a file and push it to the repository.
these commands are the right way?
git checkout -b marker_up_down //create a branch and make it as a default
git clone [email protected]:user/mygit.git // get the repository of mygit
assuming I change a file is named: "main.html" and want to push it, so I do:
git add path/main.html
git commit // add a comment of this push
git push origin marker_up_down
Upvotes: 0
Views: 2702
Reputation: 6683
I believe what you want to do is to
Clone the remote repository
git clone [email protected]:user/mygit.git
Create a branch
git checkout -b marker_up_down
Change (edit) your file
Add and commit your file
git add path/main.html
git commit
Push the change to remote
git push origin marker_up_down
Upvotes: 1