Search code examples
gitgithubgithub-for-mac

how to change git folder from previous to new?


Having problem in using the same repository previously used

I was trying some new stuff with my rails project and ended up losing its major functionalities, but I git my project on GitHub. So i downloaded from there and now when I made some changes to this newly downloaded file, I cant git to same repo now. How to git into that same repository. Like it has 8 commits now and now if I do my another commit it should be the 9th. Any help?

Hope the problem is clear..


Solution

    1. You have to install git on your device
    2. Then open terminal and type : git clone "the url of your repo on your git account"
    3. Enter your git password
    4. After cloning the app you have to add your branch. If you just have master branch you don't need to do any thing change your code and then
    5. Enter git status , git add "file path" , git push origin master
    6. Now you can see your commit and your changes on your git account!

      • for checking the remote press : git remote -v
      • for setting the correct url : git remote set-url origin "the repo path"