Search code examples
gitgithubgit-remote

How to push changes to git hub?


How to push changes to remote repository?

  1. I had one local project then i push this project to remote repository.
  2. Then I made some changes locally by creating a branch and merging it with master branch
  3. Now i am not able to push these changes to remote repository I am getting an error "rejected fetch first".

Solution

  • You face this when the local workspace is not compatible with the remote one. Maybe your remote repo contains work that local project doesn’t have. Do git pull before pushing.