Hello y’all, I seem to be struggling with Git/GitHub on VSCode as I’m new to it… Now to the problem, I have two repositories in my GitHub, I already pushed a project to “repo A” sometimes ago but while trying to push another project to “repo B” I get this error message.
“Can’t push to ref to remote. Try running ‘pull’ first to Integrate the changes”
The master seems to only pushes to “repo A” and not “repo B”… I did tried to pull first and push again. It doesn’t seems to work
How can I push this new project to a different repository? Thanks
Your question isn’t really clear to me. Is it one project you want to push to 2 repositories, or 2 projects you want to push to 2 different repositories?
Thank you John… Sorry for asking these dumb questions but I have nothing inside the remote repository except from the readMe… Is it possible that I can still clone it to my local computer?
Secondly, talking about copying my file to the recent cloned directory, won’t this affect the relative path in my html document… Thanks!!
Thanks once again John… After cloning, If I’m to work with project files in my text editor, is it going to be the files in the recently cloned repository I’d be working on or the former.
And also, can I delete the files from the old local computer after copying it to the cloned repository?
Lastly, for every repositories I create in the future, will I have to clone them all.
Git and Github have very strict rules which must be
followed.
I prefer examples:
I have an old Github Repository called “test-001” which is out of date.
I also have the source files on my local computer in the following directory /var/www/test-001 and unable to update the local directory to the Github Repository
Steps taken to update the local files to the Github Repository:
Rename /var/www/test-001 to /var/www/ZZZ-test-001,
@John_Betong, what is all this jumping through hoops? It sounds like your just not using GIT correctly. There is too much to GIT to even think about talking about how to use it here but there are plenty of tutorials out there. Here is a good starting point… https://www.atlassian.com/git/tutorials
You’re right about “not using GIT correctly”. Git and Github are remarkably complicated and have so many features which I have never used since registering a couple of years ago.
As far as I’m concerned, “In Github we trust” - because it caters for every eventuality to ensure the source does not get corrupt.
Rather than wade through the documentation to find how to recover the OP’s problem… I find it easier to clone the repository and copy and paste the old localhost problematic source files.