In Git, how can you check which repo in Github you click from the command line?

I have several projects that I am working on. I constantly pull and push. I recently made some changes to one of my files, added and made a decision and decided to push my project A, however it moved to my Github B project. Then I did git pull for kicks, and that happened.

  • master branch master → FETCH_HEAD Already updated.

He did not pull out any of my files from Project B. Then I got the git status, and he showed all the files / folders in my directory that needed to be executed. How do I know which init I am in? How can I discard this state and how can I ignore these blind commits without losing files?

+4
source share
2 answers

I think you need to reconfigure git remote

enter git remote -vand check for discrepancies or not.
If there is, follow this instruction from github: https://help.github.com/articles/changing-a-remote-s-url/

+7
source

You can check your repository's configs for:

git config -l

which contains the URL of the remote repository.

Alternatively, you can use the following command:

git remote -v
+3
source

Source: https://habr.com/ru/post/1616906/


All Articles