Git push weird behavior











up vote
-2
down vote

favorite












I am working on a branch called sofian/issue_533. I simply want to add the changes to the branch on git and somehow I can't.



Here is a picture of what git is showing ...



Thanks for the help !



enter image description here










share|improve this question




















  • 2




    Possible duplicate of Cannot push to GitHub - keeps saying need merge
    – cassandrad
    Sep 20 at 16:11















up vote
-2
down vote

favorite












I am working on a branch called sofian/issue_533. I simply want to add the changes to the branch on git and somehow I can't.



Here is a picture of what git is showing ...



Thanks for the help !



enter image description here










share|improve this question




















  • 2




    Possible duplicate of Cannot push to GitHub - keeps saying need merge
    – cassandrad
    Sep 20 at 16:11













up vote
-2
down vote

favorite









up vote
-2
down vote

favorite











I am working on a branch called sofian/issue_533. I simply want to add the changes to the branch on git and somehow I can't.



Here is a picture of what git is showing ...



Thanks for the help !



enter image description here










share|improve this question















I am working on a branch called sofian/issue_533. I simply want to add the changes to the branch on git and somehow I can't.



Here is a picture of what git is showing ...



Thanks for the help !



enter image description here







git github push pull






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 11 at 16:30









Andy

30k20101158




30k20101158










asked Sep 20 at 15:59









Sox -

13013




13013








  • 2




    Possible duplicate of Cannot push to GitHub - keeps saying need merge
    – cassandrad
    Sep 20 at 16:11














  • 2




    Possible duplicate of Cannot push to GitHub - keeps saying need merge
    – cassandrad
    Sep 20 at 16:11








2




2




Possible duplicate of Cannot push to GitHub - keeps saying need merge
– cassandrad
Sep 20 at 16:11




Possible duplicate of Cannot push to GitHub - keeps saying need merge
– cassandrad
Sep 20 at 16:11












1 Answer
1






active

oldest

votes

















up vote
3
down vote



accepted










You need to pull from the remote source first, your local branch is not up-to-date. Look in the logs, git tries to hint at it.



And also, beware of git push without any parameters, depending on your config, it might try to push all your local branches to their remote counterparts, which can be very unwanted. git push origin HEAD is safer.






share|improve this answer





















  • Did not need to pull anything as Git said, the problem was the git push command. Thanks !
    – Sox -
    Sep 20 at 17:00











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f52429037%2fgit-push-weird-behavior%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
3
down vote



accepted










You need to pull from the remote source first, your local branch is not up-to-date. Look in the logs, git tries to hint at it.



And also, beware of git push without any parameters, depending on your config, it might try to push all your local branches to their remote counterparts, which can be very unwanted. git push origin HEAD is safer.






share|improve this answer





















  • Did not need to pull anything as Git said, the problem was the git push command. Thanks !
    – Sox -
    Sep 20 at 17:00















up vote
3
down vote



accepted










You need to pull from the remote source first, your local branch is not up-to-date. Look in the logs, git tries to hint at it.



And also, beware of git push without any parameters, depending on your config, it might try to push all your local branches to their remote counterparts, which can be very unwanted. git push origin HEAD is safer.






share|improve this answer





















  • Did not need to pull anything as Git said, the problem was the git push command. Thanks !
    – Sox -
    Sep 20 at 17:00













up vote
3
down vote



accepted







up vote
3
down vote



accepted






You need to pull from the remote source first, your local branch is not up-to-date. Look in the logs, git tries to hint at it.



And also, beware of git push without any parameters, depending on your config, it might try to push all your local branches to their remote counterparts, which can be very unwanted. git push origin HEAD is safer.






share|improve this answer












You need to pull from the remote source first, your local branch is not up-to-date. Look in the logs, git tries to hint at it.



And also, beware of git push without any parameters, depending on your config, it might try to push all your local branches to their remote counterparts, which can be very unwanted. git push origin HEAD is safer.







share|improve this answer












share|improve this answer



share|improve this answer










answered Sep 20 at 16:01









RomainValeri

1,24311124




1,24311124












  • Did not need to pull anything as Git said, the problem was the git push command. Thanks !
    – Sox -
    Sep 20 at 17:00


















  • Did not need to pull anything as Git said, the problem was the git push command. Thanks !
    – Sox -
    Sep 20 at 17:00
















Did not need to pull anything as Git said, the problem was the git push command. Thanks !
– Sox -
Sep 20 at 17:00




Did not need to pull anything as Git said, the problem was the git push command. Thanks !
– Sox -
Sep 20 at 17:00


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f52429037%2fgit-push-weird-behavior%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

Hercules Kyvelos

Tangent Lines Diagram Along Smooth Curve

Yusuf al-Mu'taman ibn Hud