Feedback: Make it easy(er) to work with Git

<rant>I hate git. I hate it with a passion. Using SourceTree is probably making it 100x less complicated than it is but it's still not enough.

What I wish is that SourceTree was so easy a 5 year old could use it. If that's a built in workflow or wizard I don't care.

I'm working with one other person on a project and I've had the following problems:

• You can't pull because you have uncommited changes (ok what do I do?). I don't want to commit because these are settings file. someone says try stashing it. ok. probably should have ignored my settings files but I don't know how to do that.

• I stash the files and pull in the changes (I happen to know why pull is which basically means overwrite my changes).

• Try apply the stash. You can't apply the stash because you haven't commited the files. OK? So I'm totally lost. I try to commit. No files. What do I do?

• I do something and the files are applied or commited. Now I have unable to refresh index, needs merge on 1000 files. What the fuck did I do? How do I get out of this mess?

• Now I just want to start over. There is head, origin, master, master (in Branches), working copy, WIP in stashes. What do I choose? What do I do now?

• I'm in way over my head. I hate git. I hate everything. I never want to work on team projects again. Thinking about archeaology and different career paths. Curl into a ball and weep.

</rant>

1 answer

This widget could not be displayed.

Come down :). I suppose may of us were in your situation at some point when started working with Git :).

I'll share my personal experience. So for about a month shortly after moved from SVN to Git I hated it every day :). Then I spent a day reading tutorials, experimenting in a "dummy" local and remote repository how to achive different thing with Git and learning the different ways things can be done (yeah in Git you can do one and the same in 10 possiblie ways :) ). And after that everyting became easier, so I suggest that you sit and read and try out until you understand how Git works and you might even start to like it then.

On the point -

  • You have settings files that you do not want to commit - mark them as ignored and git will not detect them as changes and you'll be able to pull.. etc without loosing these files. I recommend keeping these files also on separate location in case you make a clean of the rpository including ignored files.
  • Pull will not completrely overwite changes but just fetch from upstream and apply the changes to the checked out branch, but in case you've got changes in files that were changed in the remote branch it will ask you to commit or reset before merging the remote changes in the checked out branch.
  • Since it appears that you've messed up your local repo then start over and manually apply the changes from the stashed commits if possible or try to apply the stashed commit and if something fail just do had reset and then try again, but do not randomly try everything before making reset as it will probably create a big mess

Follow my advice - spend a day reading and trying out that - https://www.atlassian.com/git/tutorial

Hope that helps !

To make things slightly more clear - you can add files to the ignore list by right-clicking on them in SourceTree. This will not work for versioned files. You should remove settings files from Git, and consider adding a defaults settings file (config.default.ini, for example) that you don't need to make modifications to when testing locally.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

734 views 1 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you