Tag: version control

Should 'Remove trailing whitespace' fix appear in Git history?

My question is more about general VCS policies but I will use Git in my example as it is the VCS I currently use for my projects: Let’s say I have a shared Git repository and that some committers with all access keep pushing code with trailing whitespace. The repo history is already quite long, […]

React native and web version control

React Native lets me reuse large chunks of code from the react web application in the mobile app. In fact, only the components differ, while the data layer stays the same. I want to keep the data layer in sync in two git source controlled projects. What are some good ways to do this? Does […]

Git Maintain base project

In our company we plan on having a base project. Every other web app we will make will include this base project as a sort of a “starter package”. It’s a core of essential features that will be included in every project we make in the future. The idea is that this core project will […]

Can git do a diff between a repo file and an external (non-repo) file?

I need to do a diff between the version of myfile that was in master~2, and a copy of myfile that exists outside the repository itself (say D:\folder\myfile). The wording in git-diff under –no-index says: git diff –no-index [–options] [–] […] This form is to compare the given two paths on the filesystem. You can […]

Git Flow: Automatically Close Feature Branch After Merged to Master

Summary: I would like to stop team members from closing feature branches and only close feature branches after they have been merged into master. I have the following git environment in bitbucket: master (prod) env/stage env/qa env/dev All env branches protected. All feature branches branch off env/dev then when completed, the dev creates a pull […]

How to merge features branches to branch develop in Git?

I am new to Git and I have a simple question Though this has been asked many times in this forum, I want to restrict my question to the following scenario 1) Feature A (Files A, B and C were modified) cut from ‘develop’ 2) Feature B (Files A and D were modified) cut from […]

How to build a project with maven using external modules located on git repositories?

I’m building a project with Maven. This project has multiple modules. Most of them are located in the same repository (github) but others are located in different repositories (github and bitbucket). I want my project to be built at once. This is my schema: ParentProject (pom.xml) <— located at bitbucket _module1 _module2 … External project […]

Find additions only of a file from a specific version up to current HEAD

I have a git main branch. Assume we have a main line and at various points I branch off. So let’s take a file for example: A -> B -> C -> D -> E -> F -> G -> E -> J -> K -> L -> M v.1.0.0 v.2.0.0 v.3.0.0 HEAD/master So we […]

Easier way to revert commit

I have repo with such history: H | C | M |\ | X | | | B | | | A |/ R Now I need to revert X commit. Problem – there are many commits hidden under M-C-H, some files need to be totally rewritten. Is there any trick to simplify this?

.gitignore in xcode not taking effect

My GitHub project has this structure: folderA: unrelated stuff folderB -> MyProject -> all Xcode related files including the .xcodeproj In MyProject I’ve downloaded this .gitignore: https://github.com/github/gitignore/blob/master/Swift.gitignore This .gitgnore has a line that says xcuserdata. However when seeing the pending changes in git, I clearly still see files inside MyProject.xcodeproj/project.xcworkspace/xcuserdata/. My GitHub repository was empty, […]

Git Baby is a git and github fan, let's start git clone.