-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLinux Git
More file actions
238 lines (149 loc) · 3.63 KB
/
Copy pathLinux Git
File metadata and controls
238 lines (149 loc) · 3.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
Since **Nobara is Fedora-based**, Git is very easy to install. The commands below are the current recommended methods for Fedora/Nobara systems. ([GitHub][1])
## 1. Install Git
Open a terminal and run:
```bash
sudo dnf install git -y
```
Or install the full Git package set:
```bash
sudo dnf install git-all -y
```
Verify it installed correctly:
```bash
git --version
```
You should see something similar to:
```bash
git version 2.x.x
```
([GitHub][1])
---
## 2. Configure Git
Replace the information below with your GitHub username and email:
```bash
git config --global user.name "YourGitHubName"
git config --global user.email "youremail@example.com"
```
Check your settings:
```bash
git config --list
```
([GitHub Docs][2])
---
## 3. Install GitHub CLI (Optional but Recommended)
This makes working with GitHub much easier:
```bash
sudo dnf install gh -y
```
Verify:
```bash
gh --version
```
Login:
```bash
gh auth login
```
Follow the prompts.
([GitHub Docs][2])
---
## 4. Create an SSH Key (Recommended)
Generate a key:
```bash
ssh-keygen -t ed25519 -C "youremail@example.com"
```
Press Enter through the prompts.
Start the SSH agent:
```bash
eval "$(ssh-agent -s)"
```
Add your key:
```bash
ssh-add ~/.ssh/id_ed25519
```
Display your public key:
```bash
cat ~/.ssh/id_ed25519.pub
```
Copy the output.
---
## 5. Add the SSH Key to GitHub
Go to:
[GitHub SSH Settings](https://github.com/settings/keys?utm_source=chatgpt.com)
Click **New SSH Key** and paste the key.
Test:
```bash
ssh -T git@github.com
```
Expected:
```bash
Hi username! You've successfully authenticated...
```
([GitHub Docs][2])
---
## 6. Clone GitHub Repositories
Example:
```bash
git clone https://github.com/OWNER/REPOSITORY.git
```
or with SSH:
```bash
git clone git@github.com:OWNER/REPOSITORY.git
```
Example:
```bash
git clone https://github.com/ValveSoftware/Proton.git
```
This creates a folder containing the repository files.
---
## 7. Basic Git Commands You'll Use
Move into a repository:
```bash
cd REPOSITORY
```
Check status:
```bash
git status
```
Download latest changes:
```bash
git pull
```
Upload changes:
```bash
git add .
git commit -m "Updated files"
git push
```
---
## 8. Download GitHub Projects Without Git
If you just want the files:
```bash
wget https://github.com/OWNER/REPOSITORY/archive/refs/heads/main.zip
```
Or use GitHub's **Code → Download ZIP** button.
---
## 9. Nobara-Specific Notes
Nobara uses **DNF** as its package manager, just like Fedora. For installing packages, use:
```bash
sudo dnf install PACKAGE_NAME
```
For system updates, Nobara recommends using:
```bash
nobara-sync cli
```
instead of a generic Fedora update command. ([Reddit][3])
---
## Complete Copy-Paste Setup
```bash
sudo dnf install git git-all gh -y
git config --global user.name "YourGitHubName"
git config --global user.email "youremail@example.com"
ssh-keygen -t ed25519 -C "youremail@example.com"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
cat ~/.ssh/id_ed25519.pub
```
After copying the displayed key into GitHub, you'll be able to clone, download, pull, and push GitHub repositories from your Nobara system. If you're planning to use GitHub for **Monado**, **OpenXR**, or your **Rift S on Nobara with a GTX 1660**, I can also give you the exact Git commands to download and build those projects from source.
[1]: https://github.com/git-guides/install-git?utm_source=chatgpt.com "Git Guides - install git · GitHub"
[2]: https://docs.github.com/linux-git-installation?utm_source=chatgpt.com "Set up Git - GitHub Docs"
[3]: https://www.reddit.com/r/NobaraProject/comments/1czrgtz?utm_source=chatgpt.com "How to Update Correctly"