-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit.html
More file actions
69 lines (68 loc) · 3.42 KB
/
Copy pathgit.html
File metadata and controls
69 lines (68 loc) · 3.42 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Git Tags</title>
</head>
<body>
readme.md in git repository is to give description about the project.
MIT License is a permissive free software license originating at the MIT. It is a simple and easy-to-understand license that places very few restrictions on reuse, making it a popular choice for open source projects.
<br>
GPL License is a copyleft license that requires anyone who distributes the software, with or without changes, to make the source code available under the same license. This ensures that the software and any derivatives remain free and open.
<br>
git switch -c <branch_name> is used to create and switch to a new branch in a single command.
<br>
git push origin <branch_name> is used to push the newly created branch to the remote repository named 'origin'.
<br>
git branch -M <new_branch_name> is used to rename the current branch to <new_branch_name>.
<br>
git remote add origin <repository_url> is used to add a new remote repository with the name 'origin' and the specified URL.
<br>
git push -u origin <branch_name> is used to push the specified branch to the remote repository 'origin' and set it as the upstream branch for future pushes and pulls.
<br>
-u stands for --set-upstream, which links the local branch to the remote branch.
<br>
git branch -a is used to list all branches in the repository, including both local and remote branches.
<br>
git checkout <branch_name> is used to switch to the specified branch in the repository.
<br>
git switch <branch_name> is an alternative command to switch to the specified branch in the repository.
<br>
git merge <branch_name> is used to merge the specified branch into the current branch.
<br>
git branch -d <branch_name> is used to delete the specified branch from the local repository.
<br>
git will dwtect both branches modified files and will ask you to resolve the conflicts before completing the merge.
<br>
<h1>
Create a pull request:
</h1>
1. Push your branch to the remote repository.
<br>
2. Go to the repository on GitHub (or your chosen platform).
<br>
3. Click on the "Pull Requests" tab.
<br>
4. Click the "New Pull Request" button.
<br>
5. Select your branch and the branch you want to merge into (usually main or master).
<br>
6. Review the changes and add a title and description for your pull request.
<br>
7. Click the "Create Pull Request" button to submit your pull request for review
<br>
<h1>
Delete branch after merge:
</h1>
1. After your pull request has been merged, go to the "Branches" tab in the repository.
<br>
2. Find the branch you want to delete.
<br>
3. Click the trash can icon or "Delete" button next to the branch name to delete the branch.
<br>
4. Confirm the deletion if prompted.
<br>
This will remove the branch from the remote repository.
</body>
</html>