How to acces and commit to remote branch on github

51 views Asked by At

I wanted to work on remote github repository from multiple machines, on my laptop it works as intended, however on my PC i can't connect my local branch to remote branch. Maybe they are connected but, when i try to commit message pops up saying that there is nothing to commit even though i made some changes? I did git clone of remote repository, then i did git fetch, then i did git checkout myRemoteRepositoryName.

Message when i try to commit:

Your branch is up to date with 'origin/myBranch'.

My question is how do I contribute to my remote branch from another PC?

1

There are 1 answers

8
Matti Greff On BEST ANSWER

type git status if it shows a ton of red, that means nothing is staged. Type in git add then the directory you want to stage. Once you have some content staged then type:

git commit -m "message goes here"

then you will commit to your local branch, now you can push your changes with:

git push origin myBranch