version_control:git_tips
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
version_control:git_tips [2024/04/17 21:43] – [.gitignore] mithat | version_control:git_tips [2024/04/17 22:54] (current) – [.gitignore] mithat | ||
---|---|---|---|
Line 14: | Line 14: | ||
If you really, really want to use Windows Explorer, there are reports you can specify '' | If you really, really want to use Windows Explorer, there are reports you can specify '' | ||
- | Note that '' | + | Note that '' |
Line 20: | Line 20: | ||
===== Initial configuration ===== | ===== Initial configuration ===== | ||
- | The first time you run Git, it may get angry with you because you haven' | + | The first time you run Git, it may get angry with you because you haven' |
git config --global user.name "Your Name" | git config --global user.name "Your Name" | ||
git config --global user.email " | git config --global user.email " | ||
Line 30: | Line 30: | ||
===== .gitignore ===== | ===== .gitignore ===== | ||
+ | The '' | ||
+ | |||
To make Git ignore a specific file: | To make Git ignore a specific file: | ||
<file text .gitignore> | <file text .gitignore> | ||
Line 67: | Line 69: | ||
===== Bash tips ===== | ===== Bash tips ===== | ||
- | To change directories in bash:< | + | Git is typically controlled using a command-line interface. On Windows, the preferred interface is provided by Git Bash (see above). Most Linux systems provide Bash-based command-line interfaces by default. In addition, macOS' |
- | Use forward slashes in path specifiers even though paths in Windows are normally specified using backslashes. | + | So, here is a summary of some Bash commands to help you successfully use Git. |
+ | |||
+ | To change directories:< | ||
+ | |||
+ | Use forward slashes in path specifiers even though paths in Windows are normally specified using backslashes. Paths that start with a slash are absolute (i.e., they start at the top-level of your computer' | ||
~ is a shortcut to your home (User) directory. So you could for example: <code bash>cd ~/ | ~ is a shortcut to your home (User) directory. So you could for example: <code bash>cd ~/ | ||
Line 75: | Line 81: | ||
To navigate up one level: <code bash>cd ../</ | To navigate up one level: <code bash>cd ../</ | ||
- | To list all the files (including hidden files) in a directory: <code bash>ls -la</ | + | To list non-hidden files in a directory: <code bash> |
+ | |||
+ | To list **a**ll | ||
+ | |||
+ | The asterisk is a wildcard. So, to list all non-hidden '' | ||
- | To create a new file <code bash> | + | To create a new file in the current directory: |
+ | To create a new directory in the current directory: <code bash> | ||
version_control/git_tips.1713390216.txt.gz · Last modified: 2024/04/17 21:43 by mithat