GitHub s a code hosting platform for version control and collaboration. It also lets you share your code with other groups. This is a great site to upload your own coding projects and looking at other coders work for ideas. However, it’s not always great, the problem that I had with this website was that theirs a restriction when it comes to uploading load files. Not only that but every time I upload my files using the terminal, most of them wasn’t showing in my GitHub. To upload my file completely to my git, I add “git add * -f” -f means forcing all the files to the git.
To avoid this problem:
- Write “ git add * -f ”
- Write “ git commit -m ‘commit test’ ”
- Write “ git push -u origin master. ”
Another problem that I faced is where I tried to replace my old git repository. It keeps giving me an error saying that my project already has a repository and it started messing up my project using my file to no longer use my old repository. To remove my old or new repository, I write:
git rm -r —cached folder
This git above will remove an entire directory without deleting the files when you add it to the terminal. I recommend I create a copy of your project separately just in case if your project starts to mess up. Theirs a git command that will allow you to uninstall the repository I think. However, I do not recommend to try it because when I used the git uninstall command, it made me lose some of my codes. and replaced my old previous code.