Sam, which editor are you using ? thanks
I’m using the default editor on my system, which is vim.
Hi Sam, no I mean the terminal window, with the colors …
Ah—sorry. I use iTerm2 as my terminal, with the default colour scheme.
I use zsh as my shell, with the robbyrussell theme, via antigen.
Hope that answers your questions
Hi Sam, what is the command you used to switch between insert and wq?
@samdavies @sam_vp Can you please help with this when you get a chance? Thank you - much appreciated! :]
vim has various different modes, insert being one of them. To get into insert mode press
i, at which point it’ll behave like you would expect a text editor to behave. To leave that mode press
esc. You can then use command mode to do things like jump to particular lines (e.g. line 3
:3), or save and quit (
Does that answer your question?
I got this error message below when I type “git config --global --list”
fatal: unable to read config file ‘/Users/davidlee/.gitconfig’: No such file or directory
Why is that?
The global gitconfig is stored at
~/.gitconfig, and it sounds like that file doesn’t exist. Try the following:
$ touch ~/.gitconfig
And then try the command again. This creates an empty file that git should them be able to edit when you use the command line.
How did you include hyperlinks in Vim? I can’t seem to figure it out. Thanks!
I don’t think I’ve done anything special with my vim setup at all. I think that the hyperlink highlighting comes from the fact that I’ve enabled syntax highlighting in my
~/.vimrc, and that I’m editing a markdown file.
You can enable syntax with the following in command mode (i.e. press
Maybe that will help you.
This was exactly it. Thanks!
What does this mean?
(I mean I didnt get type what type q)
This is referring to how to get out of this screen. less is the name of a command line program that allows you to page through text files. To quit and return to the prompt, type the letter
Hope that clears it up a little
Ah okay got it!
Ignore this. adding more characters to pass reply char limit
I got the message at the bottom. Not sure what to do about it. I am new to terminal and Git so probably messed something up. Any help would be appreciated.
drwxr-xr-x 1 tom 197611 0 Jul 15 13:56 .
drwxr-xr-x 1 tom 197611 0 Jul 15 13:40 …
-rw-r–r-- 1 tom 197611 23 Jul 15 13:40 HEAD
-rw-r–r-- 1 tom 197611 1074 Jul 15 13:56 License
-rw-r–r-- 1 tom 197611 130 Jul 15 13:40 config
-rw-r–r-- 1 tom 197611 73 Jul 15 13:40 description
drwxr-xr-x 1 tom 197611 0 Jul 15 13:40 hooks
drwxr-xr-x 1 tom 197611 0 Jul 15 13:40 info
drwxr-xr-x 1 tom 197611 0 Jul 15 13:40 objects
drwxr-xr-x 1 tom 197611 0 Jul 15 13:40 refs
fatal: this operation must be run in a work tree
Sorry to see you’re having problems. It’s not immediately clear to me quite what you’ve done to achieve it, but I can talk a bit about what you’re seeing.
When you create a git repo, it’s just a directory. And then inside that directory, git creates a hidden directory, called
.git. That’s where it stores all the history information, and loads of other bits and pieces it needs to operate.
The directory listing you’re showing me there is what the inside of one of those
.git directories looks like—not the git repo itself.
The error you’re seeing is telling you that you’re not inside a git repo (a “work tree”), but instead inside the magical git directory itself.
However, looking at the directory structure you have, I don’t know how you managed to create it! The only thing I can think of is that git automatically created it looking like that, because you named the directory
tomsTODOs.git instead of
tomsTODOs, although that doesn’t seem to be the case when I tested it. Or maybe you ran
git init whilst in the
Desktop directory, and then renamed the
.git directory that appeared?
Do you remember the commands you used?
I would suggest trying something like this and you should be ok:
> cd C:\Users\tom\OneDrive\Desktop
> mkdir tomsTODOs
> cd tomsTODOs
> git init
This will create a directory called
tomsTODOs on the desktop, and then initialise it as a git repo.
Let me know how you get on!
Thanks, although I only understood part of what you said, I followed your instructions and it worked. Please see below.
It seems being a GUI addict has seriously affected my ability to soak in something the first time.
Thanks for your help!
Initialized empty Git repository in C:/Users/tom/OneDrive/Desktop/tomsTODOs/.git/
On branch master
No commits yet
nothing to commit (create/copy files and use “git add” to track)