Okay, so here it goes. I was told to clone a repo and work on it. So I cloned it using:
git clone https:
. After editing more than 10-12 files, I was told to make git-pull-request. Now because I had cloned before forking and then cloning, I needed to make my local repository (repo in my machine) be added to a remote repo. To resolve it I forked the group_project repo into my account. Then used the forked repo URL to add my local repo to the forked repo URL by the following:
git remote add origin https:
There were some errors so next time I did with:
git remote add my_task https:
And then to verify I ran the command
git remote -v
. And the results turned out to be:
group_project https:
group_project https:
my_task https:
my_task https:
origin https:
origin https:
Anyways I created a branch with
git branch taskId
.And added, committed and pushed the files using
git push my_task taskID
. I successfully even pulled the request.
But when I when run the command
git checkout my_task
I get the following:
error: pathspec 'my_task' did not match any file(s) known to git
So, will I be able to fetch from upstream to my master branch?
What I have tried:
I tried to run this command:
<pre>git checkout
as well as
<pre>git checkout master
Nothing proved git to be aware of my master branch.