Say Alice and I have cloned a repository and been making changes. Alice commits her changes and pushes to remote. I then fetch that change and merge it with mine. Imagine Alice, in her latest commit, has removed a class called Vehicle. I in my turn, I have added a new class called Car that extends the Vehicle class. Now, when I merge her commit into mine, there's obviously going to be a problem. Does this mean that I have to examine the code and test it before merging? (Probably yes). What is the common practice in this situation?
What happens if I merge a commit that has removed code my new feature depends on
93 views Asked by Mikayil Abdullayev At
1
There are 1 answers
Related Questions in GIT
- problem to push files on a repository git
- diff3 output in git conflict style, including mergeable hunks
- Git Not In Sync with Local Branch
- Setting up the version control of .dotfiles while the .config is connected to a forked repo
- How to fix overriding the main branch in Git?
- I can't add text to "Message" in VS Code when committing to Git
- How can i redirect pull request from main branch to another branch
- Xcode commits (possibly outside of any branch) disappeared, how to get them back?
- Git/TortoiseGit : how to apply ONLY the changes from ONE commit from branch A, to branch B?
- How can I reintroduce username an password on git using fedora?
- GIT SKIP EMPTY DIRECTORIES
- Git smudge run once per checkout or per commit?
- I can't find ~/.profile or ~/.bashrc in C:/Users/<user>/.ssh folder
- Set environment variable during push for GitHub Actions
- Android WebRTC compile
Related Questions in MERGE
- Purpose of last 2 while loops in the merge algorithm of merge sort sorting technique
- Having trouble merging these two datasets for a Spatial Analysis
- Merge Azure mp4 blobs via API (Preferred Azure)
- Git merge strategies vs. merge drivers vs. mergetools
- Merge Request in Bitbucket: Possible to exempt a specific branch to ask for Merge Request?
- How to properly extend the generic interface with a new generic parametr using decration merging in Typescript?
- Merge effective dated records of an attribute with the main effective dated table (SQL)
- How do I merge multiple tables into a new table in BigQuery?
- Exclude a file from merging to the main branch
- Usage of merge in linux sort utility
- How can I collapse repeated missing observations into a single nonmissing observation for the same ID in SAS?
- Best way to automate auto-merging git branches
- git: merging a branch that's already been merged by mistake
- Dynamically create, merge & save dataframes in a for loop
- VBA find matching Excel files with a subtext - and merge them into single new file
Related Questions in REBASE
- How to fix overriding the main branch in Git?
- How to rebase a branch onto another branch than the upstream branch?
- Rebase over some branch with ignoring previusly dropped commit(s)
- git rebase --onto works with tags?
- Best way to automate auto-merging git branches
- git: merging a branch that's already been merged by mistake
- How to fix huge amount of commits after rebase
- Unresolvable merge conflicts following moving files
- Jgit Fixup, Squash Interactive Rebase is not working properly
- Squash old commits
- git rebase of three already merged branches into one?
- Make `git rebase -i` present and apply commits bottom to top
- Changed and Renamed directory on local GIT branch. Now I want original directory PLUS the changed one
- Revert Git rebase that is pushed to origin
- Reducing merge commit message in a super simple git workflow — why not rebase?
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
You should examine the code after the merge. You could examine the other developer's branch before merging, but that would be less convenient.
After a merge, you should rebuild the project and rerun all tests. If a class you depend on is removed during the merge, you will get a compilation error in a compiled language. In interpreted languages hopefully you have test cases covering the affected code, so the problem will become apparent when you rerun automated tests. When you detect a problem, you can inspect what was merged, and possibly discuss with the other developers any questions you may have about the reason for the changes.
Hopefully in a team with good communication and good separation of tasks, there should be no such logical conflicts in implementation changes.