project_mern_memories icon indicating copy to clipboard operation
project_mern_memories copied to clipboard

push the code to github

Open SamerMaz opened this issue 3 years ago • 4 comments

hello anyidea how i push the code to github because it's not working to push the client and server to a single branch

SamerMaz avatar Sep 20 '21 15:09 SamerMaz

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 avatar Sep 23 '21 09:09 hafeed06

@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 avatar Mar 13 '22 19:03 MatinT-SA

@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 avatar Mar 16 '22 19:03 hafeed06

@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.

MatinT-SA avatar Apr 10 '22 19:04 MatinT-SA