Skip to content
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

Introducing to git #3

Open
dpshelio opened this issue Aug 14, 2024 · 9 comments
Open

Introducing to git #3

dpshelio opened this issue Aug 14, 2024 · 9 comments

Comments

@dpshelio
Copy link
Member

This is the only time that requires using the terminal, possible to use it from vscode. Check whether it works well from powershell, or needs to open a bash from vscode.

Set your user name and email

Open a terminal and type the following commands

git config --global user.name "<name>"
git config --global user.email "<email>"

git config --list will show you that the details you have entered are Ok.

@dtwwwc1e
Copy link

Yes, vscode works fine - configuring name and email, and then --list.
powershell works fine too.
If I understand it correctly, windows linux subsystem provides for powershell and vscode relies on that. But I might be wrong.
Is git gui a viable possibility? but only available in bash. https://gitforwindows.org/

@dpshelio
Copy link
Member Author

gitforwindows should also work in powershell. For this workshop, neither of WSL or bash would be required, as the commands above should be the same. We won't need to use git gui, as VSCode will work as our gui.

@dtwwwc1e
Copy link

I meant git gui has an edit form for the git config. No, we don't want two tools. 😃

@dpshelio
Copy link
Member Author

Ooooh! if git gui has an edit form for the .gitconfig, then we may want to use that to do that step. I don't see how from its documentation.

@dtwwwc1e
Copy link

image
As such

@dtwwwc1e
Copy link

Desktop@UCL Anywhere has vscode but not integrated with git (for windows). Should we request this extension?

@dpshelio
Copy link
Member Author

dpshelio commented Aug 22, 2024

Oooh cool! I see I can do it on Linux too.
I had to, within a git repository, do:

git gui main

and then edit / options. Awesome! and it probably works on mac too. It doesn't have other parameters that we teach on a normal git lesson but these are normally set properly from the gitforwindows installation.

Desktop@UCL Anywhere has vscode but not integrated with git (for windows). Should we request this extension?

It's not an extension. I think the problem at D@UCL Anywhere is that these are "separated" apps and you need to set the settings such on vscode as:

Ctrl+shift+p and type "Open user settings json". Then insert this text between the provided { }.

    "Terminal.integrated.shell.windows": "C:\\ProgramData\\Microsoft\\AppV\\Client\\Integration\\6ABCFDEB-9F4A-4E27-8C85-33C10C448A7D\\Root\\VFS\\ProgramFilesX64\\Git\\bin\\bash.exe" ,
    "git.path": "C:\\ProgramData\\Microsoft\\AppV\\Client\\Integration\\6ABCFDEB-9F4A-4E27-8C85-33C10C448A7D\\Root\\VFS\\ProgramFilesX64\\Git\\cmd\\git.exe"

Though the path 6ABCFDEB-9F4A-4E27-8C85-33C10C448A7D may be different from time to time. I think it may depend on when they've updated git4windows.

To know the right path, you'll need to check where the git-bash application is installed, by browsing to it and clicking on the properties of the app.

@dtwwwc1e
Copy link

I like it git gui sneaked in to linux 🙂. It still means we got to go terminal and type git gui, can this be added to menu??

@dpshelio
Copy link
Member Author

That's right! We still need to use the terminal to type that - we will never get rid of it, will we? Unless there's a vs code extension that does the same.
Nevertheless, let's do this for now, as I believe that's less error prune than the whole git config... command. In the future, we could plan to look for a vs code extension (or create our own) that helps to set git config values.

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

2 participants