Question: I'm running Ubuntu on VM and MsysGit on Vista. I'm using Github as the git host and tracking the same repository from Msysgit too.

When I pull all the changes from Mysysgit and do the "git status", it lists the uncommitted changes. But when running "git status" from the Ubunutu, its all clean. No uncommitted changes.

Why is this happening in Msysgit.
Both version is 1.6

Answer: 
IMO, the "no public fields" rule is one of those rules which are technically correct, but unless you are designing a library intended to be used by the public it is unlikely to cause you any problem if you break it.

Before I get too massively downvoted, I should add that *encapsulation* is a good thing. Given the invariant "the Value property must be null if HasValue is false", this design is flawed:

```
class A {
    public bool HasValue;
    public object Value;
}

```

However, given that invariant, this design is equally flawed:

```
class A {
    public bool HasValue { get; set; }
    public object Value { get; set; }
}

```

The correct design is

```
class A {
    public bool HasValue { get; private set; }
    public object Value { get; private set; }

    public void SetValue(bool hasValue, object value) {
        if (!hasValue && value != null)
            throw new ArgumentException();
        this.HasValue = hasValue;
        this.Value    = value;
    }
}

```

(and even better would be to provide an initializing constructor and make the class immutable).
If you really need that extra performance, then it's *probably* the right thing to do. If you don't need the extra performance then it's probably not.

Rico Mariani has a couple of related posts:

* [Ten Questions on Value-Based Programming](http://blogs.msdn.com/ricom/archive/2006/08/31/performance-quiz-11-ten-questions-on-value-based-programming.aspx)
* [Ten Questions on Value-Based Programming : Solution](http://blogs.msdn.com/ricom/archive/2006/09/07/performance-quiz-11-ten-questions-on-value-based-programming-solution.aspx)