Search code examples
gitgithubgitkraken

GitKraken not pushing files to remote


I'm really new to anything git-related so hopefully this question isn't too obvious.

My repository only has one branch: main. I'm on gitkraken where I've added several files to the local repository, and I'm trying to push them to my remote repository on GitHub.com, so that I can use them for a website.

GitKraken is telling me that the push is going through but I'm not seeing any file changes on GitHub.com. Am I missing something? I've set Upstream to origin/master, I've tried making a new branch and then merging it. Not sure what else to try. Here's a screenshot of my GitKraken setup if that helps.

screenshot of my GitKraken setup

After I click the Push button it spins for a while then gives me the message "Pushed Successfully: main to origin". If I add or modify a file in the folder its reading from, then stage, commit, and push the changes, when I go to the relevant section on my GitHub I can see that the changes haven't been applied.

Edit 2: So I cd to where the repo is stored, and when I typed git push I got the message fatal: not a git repository. That struck me as odd since I had definitely been able to push updates from this repo in the past. So I did an git init then tried a git push master, which gave me two new errors: fatal: 'master' does not appear to be a git repository and fatal: Could not read from remote repository.. This is interesting...


Solution

  • I suspect the push is acutally not successful, although GK tells otherwise. You should try to push via command line and look out for error messages.

    You can do this out of GK by selecting File -> Open Terminal. The working directory in the opening bash should already be your repository's directory. Typing git push now has (about) the same effect as hitting the Push button in GK, but it will provide you with reliable feedback if it fails.

    Since GK is still under development, it does have some issues. One of those is that it tends to "swallow" certain errors, especially upon pushing to the remote repo. I suspect that is what is happening in your case. It's always good to fall back to the terminal in such cases to see what is acutally going on.