I am new to GitHub and I've started earlier this week.
I am uploading my Java projects to remote a repository as a backup.
I created a local repository within my bluej
folder, which had .java
and .class
and .ctext
files. However, I've realized after I pushed everything that I only needed .java
files.
I made another new folder with the .java
files only.
How do I make that new files "replace" my other local repository so that I can upload to the remote repository?
I tried using git remote origin master
command, but because I did it on the previous folder, I cannot "replace" it with the new one.
Sorry if some of my terms are unclear, I only started GitHub a week ago.
Thank you for reading.
You can use git rm
to delete files from the repo, so you don't need to use the second copy to fix this.
You can also use the .gitignore
file to ignore files, so your class files don't get readded to git, you can also use the ignore generator to make a template ignore file.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.