GIT push command does nothing - command is finished in 1 sec

Viewed 388

I'm facing some difficulties while trying to understand why git push command does absolutely nothing.

It's not stuck, and not hanging, it's just executing the command and finishes after 1 sec with no feedback and no changes being sent to the remote.

[suse1:/workarea]> git push origin master
[suse1:/workarea]>

When I'm trying to use verbose flag, this is the output:

[suse1:/workarea]>git push --verbose
Pushing to https://github.company.com/projects/TicketService.git
[suse1:/workarea]>

Git status shows that there is 1 commit ahead of master:

[suse1:/workarea]>git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)

nothing to commit, working tree clean

I'm trying to push the changes to the origin, from a linux server SUSE Linux Enterprise Server 12 SP5

Any idea what could it be?

1 Answers

To make sure you have all commits from your origin, and some commands for you to try,

  1. Check your remote url if it is correct, git remote -v
  2. git pull origin branch name
  3. Commit to your local branch and check with git status and git log
  4. Check if you can ping the git server.
  5. if you have your own git server, restart the git service or git server.
  6. Check your git server logs for errors
  7. Check your git client configuration
  8. Create a test repository and then clone this repository from the remote server, to see if this is successfull.
Related