Home > Software engineering >  Can I push my code to the same GitHub repository if I change the project name locally on my computer
Can I push my code to the same GitHub repository if I change the project name locally on my computer

Time:12-02

I am working on a project that's been cloned from the GitHub repository. Before, I kept working on it with the demo/sample name locally and on the GitHub repository as well. But now as I have completed it, I had to change its name.

Now the question is can I still push my code from my local device with different project name to the same old repository that I have been working on but with different name?

CodePudding user response:

Yes you can push with locally another branch.
if you didn't have git folder in your project then simple put command

 0. git init 

else

Create New Branch

  1. git checkout -b dev

Add Remote of your Existing Branch

  1. git remote add origin <https://github.com/your git repo link>

and then finally push on GitHub

  1. git push -u origin dev.

CodePudding user response:

Yes, you can. They're connected using the link you provided before when you commanded git remote add origin 'your link'. You can also change Github app name from settings.

  • Related