I want to stop pushing all file in a folder where i save my project on GitHub #69638
-
Select Topic AreaQuestion BodyI work in android studio with android apps development so recently i made a project and saved it in a folder where were my old projects were already exists . after done my project i clicked on VCS on android studio and "Pushed to github" and on that there showed me a option that do i want to push all the folders on github , I didn't understand and i clicked yes after that when all the files completed to pushing on github i saw that project i just made and the specific folder where i save the project and where were my other projects were all the files were uploaded to github in just my one repertory . |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Have you tried resetting the previous commit and then force push to main (or master) ? 'force push', can be dangerous if not used carefully. However, in this scenario, it's appropriate. |
Beta Was this translation helpful? Give feedback.
-
t appears that you've accidentally pushed all the files in a folder, including multiple projects, to a single GitHub repository. To undo this and separate your projects into their respective repositories, you can follow these steps:
Copy code
cd /path/to/your/project-folder
git init
Copy code
git add .
git commit -m "Initial commit for Project X"
git remote add origin https://github.com/your-username/project-x.git
git push -u origin master
By following these steps, you can create separate GitHub repositories for each of your projects, effectively undoing the accidental grouping of files into a single repository. Remember to replace "your-username" and "project-x" with your GitHub username and the desired repository name for each project. |
Beta Was this translation helpful? Give feedback.
t appears that you've accidentally pushed all the files in a folder, including multiple projects, to a single GitHub repository. To undo this and separate your projects into their respective repositories, you can follow these steps:
Clone the Repository: If you haven't already, clone the GitHub repository containing all the files to your local machine.
Create Separate Folders: On your local machine, create separate folders for each of your projects. Ensure that these folders are outside the current repository directory.
Move Files: Move the files and directories corresponding to each project into their newly created folders.
Initialize New Repositories: Inside each project folder,…