英文:
This branch is 1 commit ahead, 2 commits behind main
问题
I pushed all the changes to branch and then performed pull and merged into main. Then accidentally I pushed again xcuserdata/ files into main. when I checkout my branch I had to stash the xcuserdata file and branch is up to date with origin/branch. But when I checkout main I see the main code has gone back to older version of my code. How do I bring my main to the same as branch. Otherwise I will not see my branch changes in main
% git log --oneline --graph --decorate main origin/main r2nr/r2nr.xcodeproj/project.xcworkspace/xcuserdata/vhrao.xcuserdatad/UserInterfaceState.xcuserstate
* d42e9da (origin/main, main) Ignore some files
* 429d79a coredata to cloudkit works across two phones and two different cloud accounts but still exports data from one user to other user
* f737f3b Reset CloudKit dev environment and code to successfully sync and export Core data to CloudKit
* 34354cd crated Coredata entity LocationInfra and code to save it along with Location
* 3694149 Added Core Data to CloudKit synchronization for public database functionality
|\
| * d9922fc Added Core Data to CloudKit synchronization for public database functionality
* | fd94fe0 added Firebase API message notification code in AppDelegate
|/
* 290e343 Removed .DS_Store from all directories
* 1d529fd added code to track and get a list of apartment units at a given location
* a328e0a merged to main
|\
| * 0307a07 fixed bugs in add location and calculator
| * 38dc5c4 xcuserstate
| * 4461edc corrections to stage characters in source code
| * 22cbcb3 xcode files
* | 6c9d4cf xcuserstate
* | 5b30dbf xcuserstate
* | ccb9ae3 changes
|/
* cd7e27b Add location - If address is outside Texas then API will be called with user input
* 27faa5b fixed add location- verified creating iCloud records and linking provider to location
* 5f7c041 Fixed ESID lookup in Add Location
* 0284d6d fixed bugs in location ID while adding load or capacity via LoadAndCapacityTableViewController, after selecting a row from end point profile
* f90bb38 uncommented code in profilemapviewcontroller
* 2416a04 uncommented code for Details button on profilemapviewcontroller
* ec34a1c Added apartment option to household
* 6d8ac7e second commit of full code
% git log --oneline --graph --decorate main origin/main r2nr/r2nr.xcodeproj/xcuserdata/vhrao.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
* d42e9da (origin/main, main) Ignore some files
* 429d79a coredata to cloudkit works across two phones and two different cloud accounts but still exports data from one user to other user
* f737f3b Reset CloudKit dev environment and code to successfully sync and export Core data to CloudKit
* 34354cd crated Coredata entity LocationInfra and code to save it along with Location
* 3694149 Added Core Data to CloudKit synchronization for public database functionality
|\
| * d9922fc Added Core Data to CloudKit synchronization for public database functionality
* | fd94fe0 added Firebase API message notification code in AppDelegate
|/
* 290e343 Removed .DS_Store from all directories
* 1d529fd added code to track and get a list of apartment units at a given location
* a328e0a merged to main
|\
| * 0307a07 fixed bugs in add location and calculator
| * 798f467 Added .gitignore file to contain xcuserdata/ dir that overlooks both UserInterfaceState.xcuserstate and Breakpoints_v2.xcbkptlist
| * 38dc5c4 xcuserstate
| * 4461edc corrections to stage characters in source code
| * 22cbcb3 xcode files
| * b48b81c removed junk characters from code
* | 6c9d4cf xcuserstate
* | 5b30dbf xcuserstate
* | 76f8244 corrections to stage characters in source code
* | ccb9ae3 changes
|/
* cd7e27b Add location - If address is outside Texas then API will be called with user input
* 27faa5b fixed add location- verified creating iCloud records and linking provider to location
* 5f7c041 Fixed ESID lookup in Add Location
* 78daa78 fixed ESID look up in Add Location TableView Controller
* 0284d6d fixed bugs in location ID while adding load or capacity via LoadAndCapacityTableViewController, after selecting a row from end point profile
* dd5bfe5 (origin/branch091922_vr) Merge pull request #3 from vihrao/branch02_ed
|\
| * d5e1879 (origin/branch02_ed) endPtSearch
* | 4c77e77 Merge pull request #2 from vihrao/branch02_ed
|\|
| * 822fcf9 UI Changes
* | 9baaa9c Merge pull request #1 from vihrao/branch02_ed
|\|
| * 9da5e89 ProviderPlanTVC
|/
* f90bb38 uncommented code in profilemapviewcontroller
* 2416a04 uncommented code for Details button on profilemapviewcontroller
* ec34a1c Added apartment option to household
* f3bffd9 (origin/branch01_vr) changes to README.md
* 6d8ac7e second commit of full code
* 8e9d5f1 first commit
(END)
英文:
I pushed all the changes to branch and then performed pull and merged into main. Then accidentally I pushed again xcuserdata/ files into main. when I checkout my branch I had to stash the xcuserdata file and branch is up to date with origin/branch. But when I checkout main I see the main code has gone back to older version of my code. How do I bring my main to the same as branch. Otherwise I will not see my branch changes in main
% git log --oneline --graph --decorate main origin/main r2nr/r2nr.xcodeproj/project.xcworkspace/xcuserdata/vhrao.xcuserdatad/UserInterfaceState.xcuserstate
* d42e9da (origin/main, main) Ignore some files
* 429d79a coredata to cloudkit works across two phones and two different cloud accounts but still exports data from one user to other user
* f737f3b Reset CloudKit dev environment and code to successfully sync and export Core data to CloudKit
* 34354cd crated Coredata entity LocationInfra and code to save it along with Location
* 3694149 Added Core Data to CloudKit synchronization for public database functionality
|\
| * d9922fc Added Core Data to CloudKit synchronization for public database functionality
* | fd94fe0 added Firebase API message notification code in AppDelegate
|/
* 290e343 Removed .DS_Store from all directories
* 1d529fd added code to track and get a list of apartment units at a given location
* a328e0a merged to main
|\
| * 0307a07 fixed bugs in add location and calculator
| * 38dc5c4 xcuserstate
| * 4461edc corrections to stage characters in source code
| * 22cbcb3 xcode files
* | 6c9d4cf xcuserstate
* | 5b30dbf xcuserstate
* | ccb9ae3 changes
|/
* cd7e27b Add location - If address is outside Texas then API will be called with user input
* 27faa5b fixed add location- verified creating iCloud records and linking provider to location
* 5f7c041 Fixed ESID lookup in Add Location
* 0284d6d fixed bugs in location ID while adding load or capacity via LoadAndCapacityTableViewController, after selecting a row from end point profile
* f90bb38 uncommented code in profilemapviewcontroller
* 2416a04 uncommented code for Details button on profilemapviewcontroller
* ec34a1c Added apartment option to household
* 6d8ac7e second commit of full code
git log --oneline --graph --decorate main origin/main r2nr/r2nr.xcodeproj/xcuserdata/vhrao.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
* d42e9da (origin/main, main) Ignore some files
* 429d79a coredata to cloudkit works across two phones and two different cloud accounts but still exports data from one user to other user
* f737f3b Reset CloudKit dev environment and code to successfully sync and export Core data to CloudKit
* 34354cd crated Coredata entity LocationInfra and code to save it along with Location
* 3694149 Added Core Data to CloudKit synchronization for public database functionality
|\
| * d9922fc Added Core Data to CloudKit synchronization for public database functionality
* | fd94fe0 added Firebase API message notification code in AppDelegate
|/
* 290e343 Removed .DS_Store from all directories
* 1d529fd added code to track and get a list of apartment units at a given location
* 0307a07 fixed bugs in add location and calculator
* 22cbcb3 xcode files
* cd7e27b Add location - If address is outside Texas then API will be called with user input
* 27faa5b fixed add location- verified creating iCloud records and linking provider to location
* 5f7c041 Fixed ESID lookup in Add Location
* 0284d6d fixed bugs in location ID while adding load or capacity via LoadAndCapacityTableViewController, after selecting a row from end point profile
* 2416a04 uncommented code for Details button on profilemapviewcontroller
* ec34a1c Added apartment option to household
* 6d8ac7e second commit of full code
% git log --oneline --graph --decorate main origin/branch02_vr
* d42e9da (origin/main, main) Ignore some files
* dc617ba Merge pull request #4 from vihrao/branch02_vr
|\
| | * 18202e1 (HEAD -> branch02_vr, origin/branch02_vr) Added Firebase Integration
| |/
| * 2520ef3 Added Firebase Integration
|/
* 429d79a coredata to cloudkit works across two phones and two different cloud accounts but still exports data from one user to other user
* f737f3b Reset CloudKit dev environment and code to successfully sync and export Core data to CloudKit
* 34354cd crated Coredata entity LocationInfra and code to save it along with Location
* 3694149 Added Core Data to CloudKit synchronization for public database functionality
|\
| * d9922fc Added Core Data to CloudKit synchronization for public database functionality
* | fd94fe0 added Firebase API message notification code in AppDelegate
|/
* 290e343 Removed .DS_Store from all directories
* 1d529fd added code to track and get a list of apartment units at a given location
* a328e0a merged to main
|\
| * 0307a07 fixed bugs in add location and calculator
| * 798f467 Added .gitignore file to contain xcuserdata/ dir that overlooks both UserInterfaceState.xcuserstate and Breakpoints_v2.xcbkptlist
| * 38dc5c4 xcuserstate
| * 4461edc corrections to stage characters in source code
| * 22cbcb3 xcode files
| * b48b81c removed junk charecters from code
* | 6c9d4cf xcuserstate
* | 5b30dbf xcuserstate
* | 76f8244 corrections to stage characters in source code
* | ccb9ae3 changes
|/
* cd7e27b Add location - If address is outside Texas then API will be called with user input
* 27faa5b fixed add location- verified creating iCloud records and linking provider to location
* 5f7c041 Fixed ESID lookup in Add Location
* 78daa78 fixed ESID look up in Add Location TableView Controller
* 0284d6d fixed bugs in location ID while adding load or capacity via LoadAndCapacityTableViewController, after selecting a row from end point profile
* dd5bfe5 (origin/branch091922_vr) Merge pull request #3 from vihrao/branch02_ed
|\
| * d5e1879 (origin/branch02_ed) endPtSearch
* | 4c77e77 Merge pull request #2 from vihrao/branch02_ed
|\|
| * 822fcf9 UI Changes
* | 9baaa9c Merge pull request #1 from vihrao/branch02_ed
|\|
| * 9da5e89 ProviderPlanTVC
|/
* f90bb38 uncommented code in profilemapviewcontroller
* 2416a04 uncommented code for Details button on profilemapviewcontroller
* ec34a1c Added apartment option to household
* f3bffd9 (origin/branch01_vr) changes to README.md
* 6d8ac7e second commit of full code
* 8e9d5f1 first commit
(END)
答案1
得分: 0
只有在branch02_vr
和origin/branch02_vr
分支中才存在提交18202e1
,而在main
和origin/main
中不存在。
根据您想要实现的目标,您应该将branch02_vr
合并到main
或将main
合并到branch02_vr
。之后,您可能希望快进到另一个分支:
git checkout main
git merge branch02_vr
要快进到branch02_vr
分支,使用以下命令:
git push . main:branch02_vr
# 或者:git checkout branch02_vr && git merge main
不要忘记推送,以便更新远程存储库及其远程跟踪分支(origin/...
)。
英文:
Commit 18202e1
only exists in branches branch02_vr
and origin/branch02_vr
, but not in main
nor origin/main
.
Depending on what you want achieve, you should merge branch02_vr
into main
or main
into branch_02_vr
. Afterwards, you'd possibly want to fast-forward the respective other branch:
git checkout main
git merge branch02_vr
To fast-forward your branch02_vr
branch, use:
git push . main:branch02_vr
# or: git checkout branch02_vr && git merge main
Don't forget to push so that your remote repository and its remote-tracking branches (origin/...
) are updated.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论