Push code to github not working

I successfully, cloned my repo to RStudio Cloud. However, after I tried to push my code by using the interface on the menu bar (as picture shown), the message said "everything up-to-date" but when I go to check nothing was updated. So, I'm not sure if it did it correctly. Any advice will be appreciated. Thank you.

in order to have something to push, you must have first had an edit.
This shows up in the git pane as a mention of your editted file.
If you ultimately want to commit the change, the next step is called staging.
That means clicking on it s checkbox in the gitpane (or running a git add command in the console) .
Once you have at least one staged item, it is then possible to do a commit.
This can be done by pressing the commit button which is shown in your screenshot.
If you have no commits, then there is nothing to push...
It's commits rather than your code as such, that are pushable.

Thank you for your reply. I've tried to follow along but not succeed.
I ticked all the files (pic below) and clicked commit


Then, there is fatal-empty-indent-name message popped up. So, I closed and hit push. Unfortunately, it didn't update my repo.

Then, I found terminal tab (normally, I don't use it from inside RStudio). So, I issued

git status
git add .
git status
git commit -m "<COMMIT-MESSAGE>"

and hit push. Now, my repo is up-to-date.

Thank you for your help. :slight_smile:

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.