简体   繁体   English

不知何故从我的git local分支走了

[英]got out of my git local branch somehow

I'm using git and sourceTree software. 我正在使用git和sourceTree软件。

I have committed some changes 我做了一些改变

all i want to do is to have all change in local cancun_elad and push to remote cancun_elad. 我要做的就是在本地cancun_elad中进行所有更改,然后推送到远程cancun_elad。

but when I try to push it I get an error: 但是当我尝试推送它时,出现错误:

在此处输入图片说明

sourceTree: sourceTree:

在此处输入图片说明

First create a new branch 首先创建一个新分支

git checkout -b mybranch

Then switch to one of the existing branches 然后切换到现有分支之一

git checkout cancun_elad

Then merge in the changes from your old branch 然后合并旧分支中的更改

git merge mybranch

Then push your changes to the remote 然后将您的更改推送到遥控器

git push origin cancun_elad

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Git分支机构管理:本地与远程 - Git Branch Management: Local vs. Remote 当我点击按钮执行方法调用时,我的GUI卡住了 - Somehow my GUI got stuck when I click on a button to perform a method call 使用JGit按分支或提交ID签出Git存储库 - Checking out a Git repository by branch or commit ID using JGit git new本地分支创建,然后推送远程分支(new remote),然后使用JGIT进行上游设置 - git new local branch creation then push remote branch(new remote) and then set upstream using JGIT rebase main 会删除我在 git 的分支中所做的当前更改吗? - Will rebase main remove the current changes I made in my branch in git? 在我的 SelectionSort 方法中有一个我无法弄清楚的错误 - Got one error in my SelectionSort method that I cant figure out 下面的代码问题解决方案在本地 IDE 中对我有用,但在 Hackerrank IDE 中以某种方式失败,我的代码有什么问题吗 - The below Code problem solution works for me in local IDE but somehow fails in Hackerrank IDE,does my code have any problem 需要以某种方式在Java中识别本地计算机 - Need to identify local machine somehow in java Java数组索引越界越好? - Java Array Index Out of Bounds somehow? 在进入另一个分支并返回后,我看不到我在 git 分支中所做的文件更改 - I can't see file changes I made in my git branch, after I went in to a different branch and came back
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM