I' am new to git. I' am contributing to an open source project which is in the git. I forked it and created a branch. Its an android project. Then i cloned it to create a local copy and saved it in a folder. I opened it in the android studio, made the required changes.Then i did the following:
git add <the file name where i made changes>
git commit -m <message>
At this point i' am still confused as to where are the changes committed? I assume its in the local copy thats saved in my computer. Then i try to push it and it gives me the error:
git push upstream master Username for 'https://github.com': Midhun07 Password for 'https://[email protected]': remote: Permission to opendatakit/collect.git denied to Midhun07. fatal: unable to access 'https://github.com/opendatakit/collect.git/': The requested URL returned error: 403 But here opendatakit/collect.git is where the git is trying to push the changes. But i want to push changes to my master rather than the upstream/master. But when i tried to do git push master it gives me following error.
fatal: 'master' does not appear to be a git repository fatal: Could not read from remote repository. I also one another problem of my master branch being behind by 9 commits as compared to upstream/master. I' am all confused. please guide me.
master" Changes are not pushed to local branches. If you are already onmaster, thengit commitwill have created a new commit on that branch. There is no need to do anything else. If you are on another branch then you can usegit mergeto merge your changes into themasterbranch. I recommend to read git-scm.com/book/en/v2 to learn the basics.