Skip to content

Initial commands #9

Open
Open
@ianthomas23

Description

@ianthomas23

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions