top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

When I update a branch in GIT from master I don't get the same files as when I create a new branch?

0 votes
331 views

When I update my branch from master it pulls down several files, including some sass files. When I compile, however, gulp alerts me that I am missing .scss files.

I tested this by creating a new fresh branch and running gulp sass. This time there were no errors and I saw the missing .scss had been brought in.

Would anyone know why, on update, I am only getting some of the files from master?

posted Feb 23, 2017 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+1 vote

Running on Windows with latest version of Git. 1.9.4. Also had this trouble with 1.8.2 but upgraded hoping it would fix the problem.

When I do a reset on several files, it says they were successfully reverted they still show up as modified when I do a git status. In this case it's just a newline character at the end of the file. I also tried a reset -- hard and they files still show up! What the heck! Help please.

In trying to reproduce this, I re-cloned the git repo from the server, which was in the exact clean state before I started last time. No files have been modified after cloning, all are identical. Then, I created a new branch (totally new, not tracking a remote branch). Viola - I now have these files show up in my git status as modified. Please note that these are files that have been tracked for several previous commits.

Just to clarify - the only command I ran to make this happen is: git checkout -b newbranch

And GitGui shows the files as identical even when compare whitespace is turned on.

+2 votes

In our current setup, we have automatic tagging in git of all successful release builds. This makes it easy to go back to stable points in history and compare functionality, check when bugs were introduced etc.

To help with this process further, it would be useful to be able to use git bisect, but as these are just a sequence of tags, not commits on a branch, git bisect will not work as is.

Is there any tooling for automatically recreating a branch from a sequence of tags, where each generated commit is the calculated delta between each two neighboring tags?

+1 vote

For a project I use git with a dev branch. If it get's stable, it is merged to master. Now I have to maintain different versions of the software. (for example v1.0 and v2.0)

What is the best way to handle a hotfix for the old version v1.0? I know, I can create a hotfix branch. But what to do after that? Should I maintain this hotfix branch forever or is it better to merge the hotfix somehow into the master branch?

Currently I have to integrate a hotfix for v1.0. It's about a feature, which was removed in v2.0. So I think it's not a good idea to merge it back to master. But is it really a good idea to maintain a long running branch for every version?

+2 votes

I would like to know what are the best practices when creating a new branch. For example. If I get a request to do update website title from XYZ to ABC; then should I create a branch named; "Update Title"? Or I should prefix this as suggested here (http://stackoverflow.com/questions/273695/git-branch-naming-best-practices). Are there any official prefixes?

Also I am concerned about the following; Let us say I create the branch named "Update Title". Finish the change. Merge back with Master. I then get another request to change title from ABC to DEF. Can I create another branch "Update Title". Will not this be confusing?

0 votes

I work on some files and push/merge them to the remote server. Sometimes I get merge conflicts on those files and have to fix them. That's completely fine. I get that.

What I don't understand is that sometimes during this process I will get merge conflicts in files _I have never touched_. In fact they are in a completely different series of directories to the one I am working on and someone else project entirely. How am I meant to know how to fix these? I dont know what the other developer wanted to do and if they have done it right.

I thought git only merged/pushed the files you have changed? If someone else has changed Group A files on the remote repo, why must I change my local Group A files when I am _pushing _completely different set of Group B files?

Sure, Id understand if I were pulling files down to my local and had to resolve merge conflicts then, but this isn't happening when I push the files up.

Any help or advice is much appreciated. Sorry if I sound frustrated - I am really trying hard to get my head round this whole git thing but its just so weird.

...