-1

I have my Github project. My idea is to have:

  • Origin: contain latest prod version
  • Master: contain all work changes before prod
  • all local branch

I create new local branch called logFaq, I commit the code, and I want to push my logFaq branch into remote master.

What I tried is

> git push master logFaq

fatal: 'master' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

How I can solve it? I want only to merge my local branch to remote master

If I perform from my local branch :

> git log
commit fcd2d97be1d69d9e3e79ca09ff725ec3eb083203 (HEAD -> logFaq)
Author: gdelle <[email protected]>
Date:   Fri Aug 6 09:05:56 2021 +0200

    aggiunto log apertura/chiusura faq

commit 4a4209b9e74618d62938503d4bf7934325a45541 (origin/master, origin/main, origin/HEAD, master, main)
Author: gdelle <[email protected]>
Date:   Fri Aug 6 07:56:31 2021 +0200

    my first commit

3
  • Basically, first merge your local branch into local master, then push master to the remote. Aug 6, 2021 at 9:12
  • Ok how I can do it?
    – GTF
    Aug 6, 2021 at 9:14
  • Ok thank you, I'll read it! if you answer the question I click as answered.
    – GTF
    Aug 6, 2021 at 9:29

1 Answer 1

1

I'd suggest you start by reading any of the most basic guides before using git. You can find many good resources here for a start.

For the question at hand, something along the lines of

git checkout master
git merge <your-branch-name-here>
git push

But beware of doing this without understanding what's going on, maybe try some commands in a sandbox repo a couple of times if needed. And of course if the repo is shared, be sure to know what kind of workflow is agreed upon.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.