Alon Shmiel
Alon Shmiel

Reputation: 7121

github commands

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

Answers (1)

uzyn
uzyn

Reputation: 6683

I believe what you want to do is to

  1. Clone the remote repository
    git clone [email protected]:user/mygit.git

  2. Create a branch
    git checkout -b marker_up_down

  3. Change (edit) your file

  4. Add and commit your file
    git add path/main.html
    git commit

  5. Push the change to remote
    git push origin marker_up_down

Upvotes: 1

Related Questions