dlab-berkeley / bash-git Goto Github PK
View Code? Open in Web Editor NEWD-Lab's 3 hour introduction to basic Bash commands and using version control with Git and Github.
License: MIT License
D-Lab's 3 hour introduction to basic Bash commands and using version control with Git and Github.
License: MIT License
The other thing that might be useful here is for them to actually practice uploading a file to the directory
Aaron spoke at one point about having a terminal / command line “ninja” workshop → this could be a place to prepare / incorporate some of that more advanced programming in the command line or at least point students to resources and hand them a “cheat sheet” of commands
We should maybe rename this workshop to "Shell and Git" or better, "Command line and git", as Bash is being replaced by zsh.
Ask students to write a shell script that does something useful for them. For instance, they can write a shell script that creates a directory called /pdfs
under /Download
directory, then find PDF files in /Download
and, copy those files to Download/pdfs
. This shell script creates a backup.
#!/bin/sh
mkdir /home/jae/Downloads/pdfs
cd Download
cp *.pdf pdfs/
echo "Copied pdfs"
Need to add a step between steps 7 & 8 to cd back out of the challenge folder before removing it (e.g., cd ..)
This does not seem to be something that is native to Windows unless pre-installed on some OS versions. I think it only works in Powershell. But this is something that should be clarified for Windows users and downloaded if it's part of the workshop in the materials for 02_bash.md.
IMHO, this first section starts the workshop on a confusing foot since it doesn't work in all environments/shells and I recommend removing or moving it.
First things first! Your prompt (where you will enter Bash commands) can be confusing. To change it to the file path of your working directory followed by a dollar sign, type or copy/paste the below code: Type or copy/paste PS1="\w\$ " into your prompt and press Enter. Then, type exec bash into your prompt and press Enter. Now, you will have a record of your location as you move around your computer! NOTE: to display only the current working directoy - not the path - use a capital letter W in step 1 above instead :)
Emma and I discussed that it seems like lots of the workshop materials are centered around Mac OS. Thus, the Mac-specific lingo is uninterpretable by Windows users, leading to some confusion and interrupting the flow of the workshop. Thus, we need to be more intentional about having a balance between both users.
@aculich mentioned 5/31/2023 workshop to add git branch discussion.
During break, make sure participants have / (or help them make) GitHub account
01_getting_started:
02_bash:
echo
commands as a form of writing to file02_bash_challenge:
03_git:
03_git_challenge:
need this command to git push for some reason
git push -u -f origin master
There is a typo in the bash challenges that refers to "wordpac" instead of "wordpad." The instructions may also be dated because it refers to a "format" button that doesn't seem to exist in newer versions of wordpad.
discuss the significance of escape sequences as well
There are two small scripts in this workshop, one for python and another for R. If we plan to use DataHub or Binder link functionality with this workshop, we may need to create separate links, one for each platform.
Cover what the following mean in bash
.
..
*
mv (dual use as 1. To move a file and 2. To rename files)
It will be great to include something on the command "add" because in git it does not have the exact same meaning as the English word, it actually means adding an operation. Like if we remove a file locally, and want to remove it from the "staging area" and remote repo, we still do "git add file"
Add the following to the bottom of the readme file
@aculich mentioned during workshop on 5/31 for Bash-Git workshop to add an arrow for "git clone" in the image.
The file is under: Bash-Git/lessons/03_git.md "local/remote" image
This workshop is particularly difficult to teach because it’s not interactive at all
Add powerpoint slides for the workflow of using git and walk people through that
Building on some of the materials already there but making them more visually appealing and intuitive
This diagram could better explain the process starting from the initial git clone (and implicit checkout of the main branch):
I received confused questions about why the git checkout
was part of this diagram in regards to committing and pushing to github, in particular because the diagram does not match the explanatory context around it, as the following steps 1-8 don't mention it at all, and then when branching is mentioned in collaboration the diagram isn't referenced again.
Here's a crude update that we can think about how to refactor:
(Aniket to add screenshot in reply)
It would be good to have notes for instructions for windows users.
There were some trouble shooting with windows users and asking windows user to share screen and troubleshoot worked well for the workshop
For Bash for windows users / linux users, following instructions on Mac would not work.
Another example, to make font size larger for the Git Bash: Windows: Right click on top bars > settings? > Font > change font size.
@aculich presented this workshop from 10am-1pm. Here are some feedback I have on the presentation:
Presentation style
Presentation material
We've received several requests for a "advanced version" of the Bash + Git workshop would be helpful as a next step after the introductory material.
If you have specific ideas or requests of what you'd like to see included, please feel free to add to the discussion here.
add git clone [email protected]:dlab-berkeley/BashGit.git
to 1. git clone examples
Differences between command line in mac and terminal in windows - need to be articulated more thoroughly
Introduce pull/push from and to main branch first, then discuss branch nuances, specifically
git push --set-upstream origin master
instead of git push
or git push -u origin master
(this is currently not in the workshop materials)
I'm part of team 3's effort to overhaul the datasets for the workshops, and from the Readme and the current content I'm not sure if one is needed here. Will this workshop require a dataset, and if so, what sort of data would be most useful? Thanks!
I think it would be cool if participants created their own repository and added/committed/pushed from it to get some hands on experience using the git commands within their own repo. That would also allow them to get familiar with the github website and walk away with a repository they have created and can look at.
git challenge markdown file is missing solutions. @Akesari12 will add a solution for challenge 1.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.