Tuesday, February 27, 2018

unable to pull from private github repository because public repository also attached

 https://astrofloyd.wordpress.com/2015/05/05/git-pushing-to-and-pulling-from-multiple-remote-locations-remote-url-and-pushurl/


to solve the problem following can be done
https://help.github.com/articles/importing-a-git-repository-using-the-command-line/
  1. backing up the whole project at a different location just in case anything goes wrong
  2. removing .git repository (note dot before git folder)
    1. rd .git/s (windows) 
      1. type y when prompted
  3. cloning the remote repository as follows:
    1. git clone repository uri
    2. enter user name and password when prompted
    3. staging and pulling further changes like
      1. git add .
      2. git commit -m "files changed description"
      3. git origin master
      4. if getting any error then pull and after that try to push again
      5. do not push forcefully through -f as it will discard the changes made by the other team members and whole past efforts can be wasted


No comments:

Post a Comment