GIT commit Error while pushing to remote repository

0 votes
How can I resolve the below error while commiting my changes to the remote repository

 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/gungeajit/demoApp.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

Regards,

Ajit
May 31 in Git & GitHub by anonymous
• 120 points
84 views

1 answer to this question.

0 votes

Hi@Ajit,

To update your local repo to GitHub, you used git push command. But if there are any changes occur in GitHub, at that situation you have to fetch your data first from GitHub and pull all the changes from GitHub to your local repoYou can use below given command before using push command.

$ git fetch

$ git pull origin master
answered Jun 1 by MD
• 32,730 points

Related Questions In Git & GitHub

0 votes
1 answer

How to solve the ‘Git commit -a error’?

This happens when no editor is set. ...READ MORE

answered Jul 5, 2018 in Git & GitHub by Tyrion anex
• 8,380 points
232 views
0 votes
1 answer

How to add a remote git repository in Jenkins

Follow these steps: Step 1 Go to Manage ...READ MORE

answered May 23, 2019 in Git & GitHub by Alok
215 views
+1 vote
4 answers

GIT plugin in jenkins not able to connect to GIT repository

This looks like a git configuration issue, ...READ MORE

answered Oct 25, 2018 in Git & GitHub by Alia
4,880 views
0 votes
2 answers

How to view the nested workflow of a local git repository?

The closest way to view branches in ...READ MORE

answered Aug 2, 2019 in Git & GitHub by Sirajul
• 54,080 points
178 views
+5 votes
7 answers

Docker swarm vs kubernetes

Swarm is easy handling while kn8 is ...READ MORE

answered Aug 27, 2018 in Docker by Mahesh Ajmeria
1,256 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,420 points
540 views
+1 vote
2 answers
+1 vote
1 answer