Git not working

I work with two branches test and main .

So, being on the main branch , I did:

git merge test

And everything went well. All changes have been merged.

Then, to push it to the remote main , I did:

git push

But nothing seemed to be done, he said:

Total 0 (delta 0), reused 0 (delta 0)
To git@github.com:Company/My-App.git
b878c9d..0dc7fbe  main -> main

I do not think that it should show zero higher as Total if the push went through a penalty.

How can I push my main branch ?

+5
source share
1 answer

, git . , , , "main" . , , :

    ~/workspace
    $ git clone git@github.com:korin/test_merge.git
    Cloning into 'test_merge'...
    remote: Counting objects: 3, done.
    remote: Total 3 (delta 0), reused 0 (delta 0)
    Receiving objects: 100% (3/3), done.

    ~/workspace
    $ cd test_merge
    ~/workspace/test_merge

    $ git co -b test
    Switched to a new branch 'test'

    ~/workspace/test_merge
    $ echo 'a' > a

    ~/workspace/test_merge
    $ git add .

    ~/workspace/test_merge
    $ git ci -m 'a'
    [test 9953350] a
     1 file changed, 1 insertion(+)
     create mode 100644 a

    ~/workspace/test_merge
    $ git push --set-upstream origin test
    Counting objects: 4, done.
    Delta compression using up to 4 threads.
    Compressing objects: 100% (2/2), done.
    Writing objects: 100% (3/3), 273 bytes, done.
    Total 3 (delta 0), reused 0 (delta 0)
    To git@github.com:korin/test_merge.git
     * [new branch]      test -> test
    Branch test set up to track remote branch test from origin.

    ~/workspace/test_merge
    $ g co master
    Switched to branch 'master'

    ~/workspace/test_merge
    $ g merge test
    Updating f5e0184..9953350
    Fast-forward
     a |    1 +
     1 file changed, 1 insertion(+)
     create mode 100644 a

    ~/workspace/test_merge
    $ g push
    Total 0 (delta 0), reused 0 (delta 0)
    To git@github.com:korin/test_merge.git
         f5e0184..9953350  master -> master
+3

All Articles