Skip to content

Initial commands #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ianthomas23 opened this issue Jun 5, 2025 · 0 comments
Open

Initial commands #9

ianthomas23 opened this issue Jun 5, 2025 · 0 comments

Comments

@ianthomas23
Copy link
Member

As a guide to what we should work on initially, I think our use case should be one of someone learning git for the first time with a local repo (so no git clone or git fetch or git push yet). So something like:

cd some_dir
git init .
echo Hello > file.txt
git add file.txt
git status
git commit -a -m "Added some file"
git log
git checkout -b newbranch
echo blah blah >> file.txt
git commit -a -m "More words"
git log
git checkout main
git merge newbranch

This intentionally avoids the complexity of network access, accepting user input from stdin, and opening a separate editor. Eventually we will have to do these of course.

This workflow will require some git config so that there is a valid user name and email to associate with commits. This is awkward when used in cockle as there isn't a persisted home directory so writing to $HOME/.gitconfig won't work. Probably we can put the .gitconfig in the shared /drive directory so that it is persisted between sessions, so our implementation should be able to read a .gitconfig from an arbitrary directory, probably specified by an environment variable. I expect normal git supports some env var for this anyway so we just need to do the same?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant