LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-22-2020, 04:20 AM   #1
BudiKusasi
Member
 
Registered: Apr 2017
Posts: 118

Rep: Reputation: Disabled
A git branch meant to be alternative fail to be swapped


I made a branch meant to be experimental and alternative to master so did

Code:
git branch M
after it's been worked, it turns out to be better, so did swap:
Code:
git branch  -m master old 
git branch  -m M master
but when ready, did push, suddenly

fatal: The upstream branch of your current branch does not match
the name of your current branch. To push to the upstream branch
on the remote, use

git push origin HEAD:M
...

It didn't get synchronized into remote git.
How's the correct one, will anyone point out the important missing/subtle step ?
 
Old 11-23-2020, 01:52 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 15,659

Rep: Reputation: 5133Reputation: 5133Reputation: 5133Reputation: 5133Reputation: 5133Reputation: 5133Reputation: 5133Reputation: 5133Reputation: 5133Reputation: 5133Reputation: 5133
you forgot to tell us which command failed "did push ... fatal" is not enough.
From the other hand the usual way of working is to merge content and do not swap branch names. Especially altering master is not a good idea at all.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Dev branch Fedora 32 versus Dev branch Ubuntu 20.04 in relation with KVM Hypervisor LXer Syndicated Linux News 0 03-20-2020 01:31 AM
LXer: Gitpod git-bolts git-IDE onto GitHub for in-browser code git-editing LXer Syndicated Linux News 0 09-05-2018 05:50 AM
Need Advice Concerning Testing Branch and Unstable Branch kevinbenko Debian 3 12-28-2017 07:45 AM
How can i update kernel source from git with my own changes in another branch Richard.Yang Linux - Software 16 09-25-2011 02:26 PM
[SOLVED] Can't install Git repo (I don't git git ) Nemus Linux - Software 3 05-20-2011 03:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration