Skip to content

Commit 6def36a

Browse files
committed
Rearrange dotfiles section
1 parent ea70882 commit 6def36a

7 files changed

+105
-64
lines changed

_partials/dotfiles.md

+9-23
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,19 @@
11
## Dotfiles
22

3-
There are three options, choose **one**:
4-
5-
<details>
6-
<summary>
7-
<strong>I already attended Web Development (FullStack) bootcamp at Le Wagon <em>on the same laptop</em></strong>
8-
</summary>
3+
Hackers love to refine and polish their shell and tools. We'll start with a great default configuration provided by [Le Wagon](http://github.com/lewagon/dotfiles), stored on GitHub.
94

10-
This means that you already forked the GitHub repo `lewagon/dotfiles`, but at that time the configuration was maybe not ready for the new Data Science bootcamp.
5+
### Check your GitHub CLI configuration
116

12-
Open your terminal and go to your `dotfiles` project:
7+
First, let's do a quick check. Open your terminal and run the following command:
138

149
```bash
15-
cd ~/code/<YOUR_GITHUB_NICKNAME>/dotfiles
16-
<CODE_EDITOR_CMD> . # Open it in <CODE_EDITOR>
10+
export GITHUB_USERNAME=`gh api user | jq -r '.login'`
11+
echo $GITHUB_USERNAME
1712
```
1813

19-
In <CODE_EDITOR>, open the `zshrc` file. Replace its content with the [newest version](https://raw.githubusercontent.com/lewagon/dotfiles/master/zshrc) of that file that we provide. Save to disk.
20-
21-
Back to the terminal, run a `git diff` and ask a TA to come and check about this configuration change. You should see stuff about Python and `pyenv`.
22-
23-
Once this is good, commit and push your changes:
14+
You should see your GitHub username printed. If it's not the case, **stop here** and ask for help.
15+
There seems to be a problem with the previous step (`gh auth`).
2416

25-
```bash
26-
git add zshrc
27-
git commit -m "Update zshrc for Data Science bootcamp"
28-
git push origin master
29-
```
17+
### Fork and/or clone dotfiles
3018

31-
</details>
32-
33-
OR
19+
There are three options, choose **one**:

_partials/dotfiles_installer.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
### Run the dotfiles installer
2+
3+
It's time to run the `dotfiles` installer:
4+
5+
```bash
6+
cd ~/code/$GITHUB_USERNAME/dotfiles && zsh install.sh
7+
```
8+
9+
Check the emails registered with your GitHub Account. You'll need to pick one at the next step:
10+
11+
```bash
12+
gh api user/emails | jq -r '.[].email'
13+
```
14+
15+
Run the git installer:
16+
17+
```bash
18+
cd ~/code/$GITHUB_USERNAME/dotfiles && zsh git_setup.sh
19+
```
20+
21+
:point_up: This will **prompt** you for your name (`FirstName LastName`) and your email.
22+
:warning: You **need** to put one of the emails listed above thanks to the previous `gh api ...` command. If you don't do that, Kitt won't be able to track your progress. 💡 Select the `@users.noreply.github.com` address if you don't want your email to appear in public repositories you may contribute to.
23+
24+
Please now **quit** all your opened terminal windows.
25+
</details>

_partials/dotfiles_merge_upstream.md

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
Open your terminal and go to your `dotfiles` project:
2+
3+
```bash
4+
cd ~/code/$GITHUB_USERNAME$/dotfiles
5+
```
6+
7+
Time to merge the changes from `lewagon/dotfiles` into yours:
8+
1. Commit your current version of your dotfiles:
9+
```bash
10+
git add .
11+
git status # Check what will be committed
12+
git commit -m "Version prior to new setup"
13+
```
14+
15+
1. Let's bring in the changes from upstream: `git merge upstream/master`
16+
17+
1. Check that you're not in `MERGING` state. If you are, resolve any conflicts.
18+
1. Do a `git diff HEAD~1 HEAD` to check what changed.
19+
1. If nothing seems out of the ordinary, continue
20+
21+
<details>
22+
<summary>Too many conflicts?
23+
</summary>
24+
25+
Let's just take over the current version from `lewagon/dotfiles`.
26+
27+
First abort the merge: `git merge --abort`.
28+
29+
Run `<CODE_EDITOR_CMD> .`
30+
31+
In <CODE_EDITOR>, open the `zshrc` file. Replace its content with the [newest version](https://raw.githubusercontent.com/lewagon/dotfiles/master/zshrc). Save to disk.
32+
33+
Still in <CODE_EDITOR>, open the `zprofile` file. Replace its content with the [newest version](https://raw.githubusercontent.com/lewagon/dotfiles/master/zprofile). Save to disk.
34+
35+
Back in the terminal, run a `git diff` and check if this didn't remove any personal configuration setting that you wanted to keep.
36+
37+
</details>
38+
39+
Time to commit your changes and push them.
40+
41+
```bash
42+
git add .
43+
git commit -m "Update for Data Science bootcamp"
44+
git push origin master
45+
```

_partials/dotfiles_new_laptop.md

+7-35
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,13 @@
1-
Open your terminal and run the following command:
1+
<details>
2+
<summary>
3+
<strong>I already attended a Le Wagon coding bootcamp (Web Development or Data Science & AI) <em>but I have a new laptop</em></strong>
4+
</summary>
25

3-
```bash
4-
export GITHUB_USERNAME=`gh api user | jq -r '.login'`
5-
echo $GITHUB_USERNAME
6-
```
7-
8-
You should see your GitHub username printed. If it's not the case, **stop here** and ask for help.
9-
There seems to be a problem with the previous step (`gh auth`).
6+
This means that you already forked the GitHub repo `lewagon/dotfiles`, but at that time the configuration was maybe not ready for the current Data Science & AI bootcamp. Let's update it. **Ask a TA to join you for the nex steps.**
107

11-
Time to fork the repo and clone it on your laptop:
8+
First, clone your fork on this machine:
129

1310
```bash
1411
mkdir -p ~/code/$GITHUB_USERNAME && cd $_
15-
gh repo fork lewagon/dotfiles --clone
12+
gh repo clone $GITHUB_USERNAME/dotfiles
1613
```
17-
18-
Run the `dotfiles` installer.
19-
20-
```bash
21-
cd ~/code/$GITHUB_USERNAME/dotfiles && zsh install.sh
22-
```
23-
24-
Check the emails registered with your GitHub Account. You'll need to pick one
25-
at the next step:
26-
27-
```bash
28-
gh api user/emails | jq -r '.[].email'
29-
```
30-
31-
Run the git installer:
32-
33-
```bash
34-
cd ~/code/$GITHUB_USERNAME/dotfiles && zsh git_setup.sh
35-
```
36-
37-
:point_up: This will **prompt** you for your name (`FirstName LastName`) and your email.
38-
:warning: You **need** to put one of the emails listed above thanks to the previous `gh api ...` command. If you don't do that, Kitt won't be able to track your progress. 💡 Select the `@users.noreply.github.com` address if you don't want your email to appear in public repositories you may contribute to.
39-
40-
Please now **quit** all your opened terminal windows.
41-
</details>

_partials/dotfiles_new_student.md

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
<details>
22
<summary>
3-
<strong>I did not attend the Web Dev bootcamp at Le Wagon</strong>
3+
<strong>I did not attend the Web Dev or Data Science bootcamp at Le Wagon</strong>
44
</summary>
55

6-
Hackers love to refine and polish their shell and tools. We'll start with a great default configuration provided by [Le Wagon](http://github.com/lewagon/dotfiles), stored on GitHub. As your configuration is personal, you need your own repository storing it, so you first need to fork it to your GitHub account.
7-
8-
:arrow_right: [Click here to **fork**](https://github.com/lewagon/dotfiles/fork) the `lewagon/dotfiles` repository to your account (you'll need to click again on your picture to confirm _where_ you do the fork).
6+
As your configuration is personal, you need your own repository storing it, so you'll need to fork it to your GitHub account.
97

108
Forking means that it will create a new repo in your GitHub account, identical to the original one. You'll have a new repository on your GitHub account, `your_github_username/dotfiles`. We need to fork because each of you will need to put specific information (e.g. your name) in those
119
files.
10+
11+
Lets' run this command to fork the repo, and clone it on your laptop:
12+
13+
```bash
14+
mkdir -p ~/code/$GITHUB_USERNAME && cd $_
15+
gh repo fork lewagon/dotfiles --clone
16+
```

_partials/dotfiles_same_laptop.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<details>
2+
<summary>
3+
<strong>I already did the setup of a Le Wagon coding bootcamp (WebDev or Data Science & AI) <em>on the same laptop</em> before</strong>
4+
</summary>
5+
6+
This means that you already forked and cloned the GitHub repo `lewagon/dotfiles`, but at that time the configuration was maybe not ready for the current Data Science & AI bootcamp. Let's update it. **Ask a TA to join you for the nex steps.**

build.rb

+4-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@
2626
dotfiles
2727
dotfiles_new_student
2828
dotfiles_new_laptop
29-
dotfiles_new_laptop_heading
30-
dotfiles_new_laptop
29+
dotfiles_merge_upstream
30+
dotfiles_same_laptop
31+
dotfiles_merge_upstream
32+
dotfiles_installer
3133
conda_uninstall
3234
osx_python
3335
virtualenv

0 commit comments

Comments
 (0)