public
nobgit
read
community.wiki
For NobGit Community
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/community.wiki.git
ssh://[email protected]:2222/orgs/nobgit/community.wiki.git
Trace
Repositories/Commit Changes.md
Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.
Author
Date
Commit
Line
Code
1
# How to commit to NobGit
3
An [SSH key](How to upload an SSH key.md) or [access token](How to create an access token.md) is required to push code to NobGit. Password authentication is not supported.
5
## Prepare Git
7
1. Install Git on your computer.
8
2. Set the name and email address you want on commits.
10
```
11
git config --global user.name "Your Name"
12
git config --global user.email "[email protected]"
13
```
15
## Clone a repository
17
Open the NobGit repository and use the clone panel to copy either the HTTPS or SSH clone URL.
19
```
20
git clone https://www.nobgit.com/{owner}/{repo}.git
21
cd {repo}
22
```
24
For HTTPS, use your NobGit username and an access token when Git asks for credentials. For SSH, add an SSH key to NobGit first.
26
## Commit and push changes
28
1. Edit or add files in the repository folder.
29
2. Review the changed files.
30
3. Stage the files you want to commit.
31
4. Create the commit.
32
5. Push the branch to NobGit.
34
```
35
git status
36
git add .
37
git commit -m "Describe your change"
38
git push origin main
39
```
41
## Edit from NobGit
43
1. Open the repository in NobGit.
44
2. Click the file you want to change.
45
3. Edit the file in NobGit.
46
4. Write a clear commit message.
47
5. Commit the change.
49
If your repository uses a different default branch, replace `main` with that branch name. If the push is rejected because the remote has newer commits, run `git pull --rebase origin main`, resolve any conflicts, and push again.
51
- [Previous: GPG key](How to upload a GPG key.md)
53
- [Next: releases](How to upload and use releases.md)