Comments (10)
Hmmm... It is not straightforward to come up with a dotfile that is relatively easy to explain. The file should be there in the actual folder when they clone/download the repo. I was thinking a .bashrc file with just one command, but it should then be one that doesn't trip the student. Even a simple thing as an alias (alias la='ls -la') would require a few lines to explain. Is there a type of dotfile that makes sense, but has no content, or one that can be easily understandable?
from shell-novice.
On Mon, Feb 02, 2015 at 06:52:35AM -0800, Lex Nederbragt wrote:
The file should be there in the actual folder when they
clone/download the repo.
.gitignore?
from shell-novice.
On 2 Feb 2015, at 18:13, W. Trevor King wrote:
On Mon, Feb 02, 2015 at 06:52:35AM -0800, Lex Nederbragt wrote:
The file should be there in the actual folder when they
clone/download the repo..gitignore?
Maybe. It would mean adding a .git folder as well, with the burden of having to explain these - and why would the entire 'nelle' folder be under version control…
Lex
from shell-novice.
@wking's suggestion of .gitignore would be a fine addition since it is in almost every GitHub repo listing that one sees. You do not have to explain .git folder. I don't think that you need to explain why 'nelle' is under version control in this novice lesson (though why wouldn't it be since one could .gitignore any binary/image files).
Alternatively, one could show them a Git repo like this:
from shell-novice.
On Tue, Feb 03, 2015 at 01:59:03AM -0800, Lex Nederbragt wrote:
Maybe. It would mean adding a .git folder as well, with the burden
of having to explain these - and why would the entire 'nelle' folder
be under version control…
I'd have the students getting the example files via a Git repository
(either via a ‘git clone …’ or via an archive zip 1). That's going
to come with a .gitignore (and .nojekyll) out of the box. The clone
will also come with a .git. The shell lesson usually lands before the
Git lesson, so I'd just say something like:
The .gitignore file has a leading dot to mark it as a hidden file
(or directory). Dotfiles are just like a regular files, except that
ls
doesn't list them by default and the shell doesn't use them
when expanding wildcard globs like *
(although it will only use
dotfiles when expanding .*
). Programs generally use dotfiles for
configuration and other things that the user only needs to interact
with occasionally; that way they're not cluttering up your working
directory the rest of the time.
Git is a version-control program, which means it tracks how your
files change over time. We'll learn more about it later, but as an
example dotfile, we can peek inside the .gitignore file:
$ cat .gitignore
*~
*.pyc
That's telling Git that we don't want it to track files ending with
~
(editors save files like this) or .pyc
(Python caches files
like this).
There are likely lots of other dotfiles on your system (for example,
try ls -d ~/.*
), so feel free to poke around and see the sort of
thing they're used for.
from shell-novice.
-1 to making the shell lesson depend on use of Git - too many real-world
failure modes.
from shell-novice.
On Tue, Feb 03, 2015 at 10:32:55AM -0800, Greg Wilson wrote:
-1 to making the shell lesson depend on use of Git - too many
real-world failure modes.
I'm not suggesting a Git dependency, I'm suggesting optional use of
Git with a zip-download fallback 1. Students will need to get the
example files somehow, and “try Git, but fall back to a zip download
of the same content (without the history)” seems like a pretty safe
bet to me.
from shell-novice.
I like @lexnederbragt 's idea of a .bashrc
or .bash_profile
as a sample dotfile. It doesn't need to be functional - it could live in the nelle
user directory - and then people would have something to compare to their own .bash_profile
in their home directory.
semi-related question: do we have a convention for how students get the data files for this lesson? (may be relevant to #62). clone this lesson repo? clone something else? zip download?
from shell-novice.
PR submitted, #63
from shell-novice.
@lexnederbragt Thanks for the PR. I like the changes using .bash_profile. I did leave a comment on the PR suggesting a clarification on dotfiles and the -a option for ls.
from shell-novice.
Related Issues (20)
- Typo? The Unix Shell: Shell Scripts episode. HOT 3
- The Unix Shell: Finding Things. Different on-screen message from Git Bash. HOT 2
- Add OneDrive/OS info to inline instructor notes HOT 1
- Links need to be fixed in CONTRIBUTING.md
- command line an inherent disadvantage? HOT 1
- Adding a note on when to use - vs -- HOT 1
- No mention of globs
- Glossary "shell" term has a broken anchor link in its text HOT 1
- removing unneeded files solution not quite right HOT 1
- Link to installation instructions points to a workshop template HOT 6
- Use consistent path settings
- Other Options for Finding Files in Episode 7
- Where do we get 1518 files? HOT 1
- Broken link to regex lesson HOT 6
- Consider moving callout about long/short options
- macOS now uses Zsh as default shell HOT 2
- Grammar Mistake in "07-find.md" at "Matching and Subtracting" solution.
- A detail in Unix Shell Pipes and Filters Lesson HOT 3
- Ep. 02: Link to Glossary not resolved
- Ep. 05: Remove redundant paragraphs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shell-novice.