project_mern_memories
project_mern_memories copied to clipboard
push the code to github
hello anyidea how i push the code to github because it's not working to push the client and server to a single branch
You should git init from the folder that contains both client and server folders not from inside one of the two So if your folder is: /memories/client | memories/server You: cd memories then run: git init
@hafeed06 Actually I tried to do the same thing but since there's no pacakge.json file on the root directory, then that's not gonna be like the regular methods of pushing our codes into our Github repository. Should I deploy the server and the client side separately on a same repository? Can you elaborate a little bit? Thanks.
@MatinT-SA Of course. Github is just like a storage space for your code basically, the same way you have a folder that holds a backend folder and a front end folder on your laptop. Same would apply for your git repository.
@hafeed06
thanks man. Hopefully I could push both my client and server folders to my Github repository.
the problem was the hidden .git
file located inside my client folder which I had to get rid of it and then try to push that particular folder to my Github repo again.
This answer on Stackoverflow also helped me to remove this file properly: https://stackoverflow.com/a/62255502/15693922 It might be useful for others.