Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 858965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:36:49+00:00 2026-05-15T08:36:49+00:00

I made a commit of my repository a week ago but never actually pushed

  • 0

I made a commit of my repository a week ago but never actually pushed it to the remote at github, which I did today. However, in the time from my commit I made many changes to the source. But just the initial commit was pushed to remote and while doing it, it also overwrote my local files.

What can I do to get back my current files??

For better understanding, this is what I’ve done:

  1. Created new VS project and created a new git repository in it,
  2. Performed an initial scan, stage and commit but without adding a remote and performing a push,
  3. Worked on files for a week,
  4. (Today) Forgot to perform rescan, new stage and commit and just created new GitHub repository and performed this:

git remote add origin git@github.com:myaccount/webshop.git

git push origin master

  1. Now the files in GitHub repository are the ones from inital commit and those were also copied over my current files, so I’m in the initial commit stage now locally too, which is awful.

Help appreciated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T08:36:49+00:00Added an answer on May 15, 2026 at 8:36 am

    It appears that you accidentally stashed your changes.

    This command lists any stashes that you have made.

    git stash list
    

    git will only apply a stash if you don’t have any unstaged changes in your working tree, so to apply the changes you can stage any unstaged changes with this command.

    git add -u
    

    Then you can apply the stash with this command.

    git stash apply
    

    git may prompt you to resolve any conflicts if you are applying onto a file which has changed since you made the stash.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to update a Git repository on GitHub. I made a bunch of
I have a SVN repository running on a server - to which I commit
I made a commit about a month ago that involved me creating new folder
I forked someone elses repository on Bitbucket and made some changes (and pushed them
I have a local git repository which tracks a remote SVN repository via git
I have a repository on github, and someone else has forked it and made
While trying to revert a commit I made to my repository of my .emacs.d
I did a: git clone http://github/anotheruser/something.git my-space and made some changes. Is there anyway
I cloned a git repository from GitHub, made some changes and some commits; I
I just made a new repository on github. Starting with a folder full of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.