102 lines
1.6 KiB
Markdown
102 lines
1.6 KiB
Markdown
# Single Head C51 Based Controller Program
|
|
|
|
This is a single-head C51-based controller program.
|
|
|
|
## How to Use
|
|
|
|
### 1. Clone the Repository
|
|
|
|
1. Open **Command Prompt** or **PowerShell**.
|
|
2. Clone the repository using:
|
|
|
|
```bash
|
|
git clone https://forgejo.filltronicsautomation.cloud/Anurag/Test.git
|
|
```
|
|
|
|
3. Navigate to the cloned repository:
|
|
|
|
```bash
|
|
cd Test
|
|
```
|
|
|
|
### 2. Check and Switch Branches
|
|
|
|
1. Check the current branch:
|
|
|
|
```bash
|
|
git branch
|
|
```
|
|
|
|
2. Checkout the branch you want to work on:
|
|
|
|
```bash
|
|
git checkout YOUR_BRANCH_NAME
|
|
```
|
|
|
|
3. To create a new branch from the `main` branch:
|
|
|
|
```bash
|
|
git checkout -b YOUR_NEW_BRANCH_NAME
|
|
```
|
|
|
|
### 3. Make and Test Changes
|
|
|
|
1. Edit the required files.
|
|
2. Compile the project.
|
|
3. Test all changes thoroughly.
|
|
|
|
### 4. Review Changes
|
|
|
|
1. Open a terminal or command prompt in the local repository directory.
|
|
2. Check the repository status:
|
|
|
|
```bash
|
|
git status
|
|
```
|
|
|
|
3. View changes in a specific file:
|
|
|
|
```bash
|
|
git diff file_name
|
|
```
|
|
|
|
4. View all changes:
|
|
|
|
```bash
|
|
git diff .
|
|
```
|
|
|
|
Press `q` to quit the diff viewer.
|
|
|
|
## Committing Changes
|
|
|
|
1. Stage a specific file:
|
|
|
|
```bash
|
|
git add file_name_which_edited
|
|
```
|
|
|
|
Or stage all modified files:
|
|
|
|
```bash
|
|
git add -A
|
|
```
|
|
|
|
2. Commit the changes:
|
|
|
|
```bash
|
|
git commit -m "Your commit message"
|
|
```
|
|
|
|
3. Push the changes to the remote repository:
|
|
|
|
```bash
|
|
git push
|
|
```
|
|
|
|
## Notes
|
|
|
|
- Always ensure your code compiles successfully before committing.
|
|
- Review changes using `git diff` before creating a commit.
|
|
- Use meaningful commit messages that clearly describe the changes made.
|
|
|