Re: pushing a branch without merging

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: pushing a branch without merging

From: Carlo Trimarchi <hidden>
Date: 2016-06-15 22:51:30

2011/6/20 Massimo Manca [off-list ref]:
then you edit and add files on the newly branch, so as usually you have
to use:
   git add .
   git commit -m "what I change on this branch" -a

When you have to update the remote then staying on experimental branch
you can:
   git push
This is exactly what I did, but on the server it showed the old version.
This is what appears when commiting:

➜  website git:(experimental) ✗ git commit -a -m "commit message"
[mario_style 7764c96] commit message
 2 files changed, 315 insertions(+), 204 deletions(-)
 rewrite index.html (88%)
➜  website git:(experimental) ✗ git push website
Counting objects: 7, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 451 bytes, done.
Total 4 (delta 2), reused 0 (delta 0)
To ssh://myserver.bla.com/home/user/website.git
   f93d62f..eb8e369  master -> master

I'm in the experimental branch, but in the end it shows master ->
master. Maybe that is what it is supposed to show, not sure.

Re: pushing a branch without merging

From: Carlos Martín Nieto <hidden>
Date: 2016-06-15 22:51:30

On Mon, Jun 20, 2011 at 04:56:12PM +0200, Carlo Trimarchi wrote:
2011/6/20 Massimo Manca [off-list ref]:
quoted
then you edit and add files on the newly branch, so as usually you have
to use:
   git add .
   git commit -m "what I change on this branch" -a

When you have to update the remote then staying on experimental branch
you can:
   git push
This is exactly what I did, but on the server it showed the old version.
This is what appears when commiting:

➜  website git:(experimental) ✗ git commit -a -m "commit message"
[mario_style 7764c96] commit message
 2 files changed, 315 insertions(+), 204 deletions(-)
 rewrite index.html (88%)
➜  website git:(experimental) ✗ git push website
Counting objects: 7, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 451 bytes, done.
Total 4 (delta 2), reused 0 (delta 0)
To ssh://myserver.bla.com/home/user/website.git
   f93d62f..eb8e369  master -> master

I'm in the experimental branch, but in the end it shows master ->
master. Maybe that is what it is supposed to show, not sure.
By default, git-push only pushes matching branches (those that exist
both in the local and remote repos). What you want to do might be

   git push website experimental

if you want to create the branch 'experimental', or if your deployment
system only checks out the 'master' branch, you might find

    git push website experimental:master

useful. In this case you may have to force-push master again, which is
not recommended (though in your case it might be fine). You can find
more details about how to specify which branches you want to push in
the git-push manpage.

Cheers,
   cmn

Re: pushing a branch without merging

From: PJ Weisberg <hidden>
Date: 2016-06-15 22:51:30

On Monday, June 20, 2011, Carlos Martín Nieto [off-list ref] wrote:
if you want to create the branch 'experimental', or if your deployment
system only checks out the 'master' branch, you might find

    git push website experimental:master

useful. In this case you may have to force-push master again, which is
not recommended (though in your case it might be fine).
FYI, that *replaces* the remore master branch with the local
experimental branch.  If you just want someone else to be able to be
able to 'git pull website experimental', what you want to do is 'git
push website experimental' or 'git push website --all'.

-- 

-PJ
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help