Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

resolve merge conflicts git

Merge conflicts usually occur when multiple developers work on the same code 
of a project or when they work with several development branches. 
Git merge warns the user about these conflicts.

Although most merge conflicts resolve automatically, there are cases when 
git merge cannot resolve an issue.

# Accept the local version. 
git checkout --ours <file name>
# Alternatively, to accept the local version for all conflicting files, use:
git merge --strategy-option ours

#  Accept the remote version
git checkout --theirs <file name>
# Accept the remote version for all conflicting files with:
git merge --strategy-option theirs
Comment

how to handle merge conflicts

git stash        -- > take my project to temp memory
git pull         -- > pull the project from GitHub to working directory
						(my computer)
git stash pop    -- > take my project to my working directory,     
					fix the conflict and merge the project.
git add .
git commit –m “comment”
git push
Comment

what is merge conflict in git

A merge conflict is an event that occurs when Git is unable to
automatically resolve differences in code between two commits.
When all the changes in the code occur on different lines or in
different files, Git will successfully merge commits without
your help
Comment

resolve merge conflict

git checkout develop
git merge --no-ff 'feature/imoh/issue#83_fingerprintRecognition'
git push origin develop
Comment

git merge conflict resolve

$ git commit -m "Resolved merge conflict by incorporating both suggestions."
Comment

resolve merge conflict

git fetch origin
git checkout -b 'feature/imoh/issue#83_fingerprintRecognition' 'origin/feature/imoh/issue#83_fingerprintRecognition'
git merge develop
Comment

CONFLICT (content): Merge conflict in

CONFLICT (content): Merge conflict in bash/alx

edit the changes manually 
git add *
git stash
git pull

git merge branh-name
Comment

PREVIOUS NEXT
Code Example
Shell :: raspberry pi wifi headless 
Shell :: find external ip ubuntu 
Shell :: remove last commit from remote 
Shell :: gnome set wallpaper command line 
Shell :: create zip file command line 
Shell :: args in shell 
Shell :: delete branch gitlab 
Shell :: how to make makefile 
Shell :: ubuntu 
Shell :: ubuntu clone git repository 
Shell :: manually shut down docker mac 
Shell :: start docker image 
Shell :: grep second line 
Shell :: list groups linux for user 
Shell :: terraform plugin for vim 
Shell :: random number in bash 
Shell :: exit branch git 
Shell :: how to delete an issue on github 
Shell :: wget debian 
Shell :: git newly created branch not showing 
Shell :: dockerfile copy folder to container 
Shell :: install nvm mac 
Shell :: linux calculator 
Shell :: how to keep track of github profile views 
Shell :: rsync full disk backup 
Shell :: ho to autostart chrome on linux boot 
Shell :: libbre office ubuntu 
Shell :: recursively replace : to _ in file names linux 
Shell :: grep substring in shell 
Shell :: how to install skimage in pycharm command 
ADD CONTENT
Topic
Content
Source link
Name
8+2 =