7.9 Git Merge Rebase (Copying Commits as Latest)
** feature-1 is developed long back** after feature-1 , master got added another features** if we directly merge child(feature ) branch to master branch all
** feature-1 is developed long back** after feature-1 , master got added another features** if we directly merge child(feature ) branch to master branch all
Task : Copy a commit from feature-1 branch → master branch (i). Checkout to feature branch(Here I Created feature-1 branch, Added f1,f2 files and committed)
Steps to merge : (i) First we have to checkout to a branch where we need child/feature branch files and commits git checkout master (ii)
To mark commit good with bisect(bisect used for debugging) git bisect good <commit-id> To mark commit bad with bisect git bisect bad <commit-id> To list
We can see the log responce , six is renamed as six-two.txt
git show commands: To see latest commit info with changes(diff) on old to new files git show To see specific commit info with changes(diff) on
Commit history with information git log Commit history with information in one line git log –oneline Here some more commands for filtering the log responce:
Git commit : Single line commit Git commit -m “commit name” Commit with large information(editor opens) git commit or git commit -v Commiting Modified, Tracked
1 Track the changes of two commits git diff <commit1-sha> <commit2-sha> 2 Track the changes of two branches git diff <branch 1> < branch 2>