I am new in GitHub And I have linked my android xyz project with GitHub previously. After sometime I use GitHub desktop for pushing code in GitHub. And I have copied the code from android studio and pasted it in the GitHub desktop directory where I have created new repository. And then I use push command. But one thing is that mistakenly I forgot to copy each files from android studio. But my android studio code gets updated with the new files and hence all the files which I forgot to copy gets deleted. I want to know how can I bring these files which exist before the push.
1 Answer
I am not sure to fully understand your problem but in Git, when you want to check the previous state of a document, you use the commit history. It is a feature generally available in your IDE (I added a link below for Android studio), online, in GH Desktop, or more traditionally via the CLI. If you are online on Github, you can access the commit history by clicking on the small rounded arrow available above your source code, which will take you to /yourrepo/commits/yourbranch. Some resources:
- https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History
- https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/making-changes-in-a-branch/viewing-the-branch-history-in-github-desktop
- Where can I see the commit history on the gitHub website?
- View Git History in Android Studio
Lastly, you can check the entire state of a repo by clicking the following icon when you are online:
Hope that can help a bit.
