jdonson / first-null-commit

New devs... first NULL commit to github....
0 stars 2 forks source link

Github Issue - DS Store #4

Closed Niteshvgupta closed 9 years ago

Niteshvgupta commented 10 years ago

Any Mac User is going to have this issue

removing .DS_store files

http://stackoverflow.com/questions/107701/how-can-i-remove-ds-store-files-from-a-git-repository

Plan is to do what the above article says.

Niteshvgupta commented 10 years ago

Should I remove these or ignore them?

jdonson commented 10 years ago

I think we can remove them, but they will automatically be recreated by OS X when we host local repos on our apple laptops. We should remove them from the repo one time, as described in the article.

Then we ought to configure the .gitignore file as described in that article.

Then we need to consider how to test this.

Please take a look at gists: https://gist.github.com/jdonson/6686919

The first four things to learn about git are:

  1. git global config user
  2. git global config email
  3. .gitignore
  4. readme + repo license

Please go thru all four on your laptop and consider how we might test this!! Thanks!

jdonson commented 10 years ago

=> The right way to do this would be:

  1. Create a new project github issue.
  2. Cite that page and discuss what you want done. Delegate to me (acting proj mgr).
  3. Get approval on that plan. Delegate to you (project dev).
  4. Make change locally.
  5. Test change locally.
  6. Report on changes in issue queue. Delegate to me.
  7. I review proposed changes and approve or not.
  8. You make changes, run tests and commit. Reference Issue URL in commit log message!
  9. Push to jdonson project repo.
  10. I pull again from jdonson to urbanspectra project repo.
  11. We discuss how to promote this project to urbanspectra as origin.

https://github.com/jdonson/first-null-commit/issues

We should probably move a lot from the code to the wiki in this project.

Please look at http://github.github.com/github-flavored-markdown/ to see how these entries can be wiki-formatted.

Niteshvgupta commented 10 years ago

Ok where are we in that list of steps? Step 2, discuss what needs to be done?

Niteshvgupta commented 10 years ago

Below is what the stackoverflow article says to type in. If we add DS_Store to gitignore, how can it be recreated? Are you talking about different repos? We could just run the script everytime we create a new repo, no?

find . -name .DS_Store -print0 | xargs -0 git rm --ignore-unmatch Add the line

.DS_Store to the file .gitignore, which can be found at the top level of your repository (or created if it isn't there already). Then

git add .gitignore git commit -m '.DS_Store banished!'

jdonson commented 10 years ago

I believe that there are (at least) two tests to define:

  1. how do we both remove and test for .DS_Store files on our Apple OS X filesystems?
  2. how do we use .gitignore to not share this annoying file with others thru git repos?
jdonson commented 10 years ago

http://augustl.com/blog/2009/global_gitignores/

Does this page give us more info?

At what point in the process of making edits, adding and committing are we expecting to see .gitignore at play?

Niteshvgupta commented 10 years ago

I think after our first commit we will see DS_Store, no?

Also, from that blog, he made a very good case for using this : > git config --global core.excludesfile ~/.gitignore

My guess is that we would need to configure each Mac computer to globally exclude the file, and then we'd never see it again. Does that sound right?

jdonson commented 10 years ago

There are two measures to take:

  1. prevention at repository level with .gitignore => This one goes in this repo!

We would want to ignore all files that are artifacts from all systems: OS X, Linux, Windows

  1. prevention at system level with global .gitignore config => This one seems a good candidate for proposed project3, which I believe will be recipes, scripts and clones of dev kitchen set ups on Mac OS X and Linux.