Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
MySetup
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TongZuu
MySetup
Commits
2ff138f1
Commit
2ff138f1
authored
6 years ago
by
TongZuu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update git-command.md
parent
d12cc22e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
7 deletions
+23
-7
git-command.md
git-command.md
+23
-7
No files found.
git-command.md
View file @
2ff138f1
#
#
Git Command
# Git Command
#### create file .gitignore
```
...
...
@@ -55,10 +55,29 @@ git -c user.name='Paul Draper' -c user.email='my@email.org' commit -m '...'
git config --global credential.helper 'cache --timeout=3600'
```
---
## Git patch and apply
# Git patch and apply
#### create patch from tag to current
format : git format-patch {{from_tag}} --stdout > {{path_to_patch_file}}
```
git format-patch v1 --stdout > ../v2.patch
```
#### apply patch to project
format : git apply {{path_to_patch_file}}
```
git apply my.patch
```
# Other
#### new branch from master. modify success
```
...
...
@@ -77,9 +96,6 @@ git format-patch --stdout bb25e649fcbc539d99945600c262636621b48a3f..a427ce27eee3
git archive -o update.zip HEAD $(git diff ce1f8df 8a22bd8 --name-only)
```
#### apply patch to project
```
git apply my.patch
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment