git-rant
Single Source problem
We have single source of truth in main branch. I'm looking for a way so that when a developer is working on their feature-x branch, their repo is in sync with main branch. As time progresses the feature-x branch creates more conflicts with the main branch. This could be have been avoided if the feature-x branch was always in sync with the main branch. The developer would have started making changes to the file from the main branch at this point in time instead of changes to the file from main branch when the branches diverged.
There are 2 approaches i take to this, it varies from time to time.
- Make small commits in feature-x and merge it to master, as the feature-x is not yet complete. These are usually codes that don't break the application(e.g: all are functions and these functions are not invoked). This is not a good approach for config files.
- rebase with main branch daily, as i work on branch alone i get the freedom to force push without worry to feature-x branch. Even then there are conflicts somedays. Which could have been avoided if i started working from the main branch.
Need a better way to fork and work on an existing project
the way we clone and work on a new kind of project is, we clone it, we do our modifications, we just wish to mess around with its content and not actually make any changes. once we start making those changes, we add in those tarballs or whatever and we maintain our artifacts to check whether something is working or not. This of course can all be avoided by following the git principle strictly of committing, but the problem of this thing is not ready yet! keeps us away from pushing it. So I've seen peeps push the whole thing including the backup tarballs to the git repo and exponentially increase the size instead of starting from a clean slate.