mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Create git-sd.md
Add some information for sd users about starting with git. [skip ci]
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
# Quick git-primer for sd users
|
||||
|
||||
There few important conceptual differences with **sd**.
|
||||
This list tries to bridge the gap
|
||||
|
||||
* When you do `git commit` changes are stored in your local clone of the repo.
|
||||
To Submit them, you need to do `git push`.
|
||||
* Forks are just a way to store branches.
|
||||
You can push branch to the original repo (if you have permissions) or to the fork.
|
||||
There is no principal difference.
|
||||
* Most of the git complications come from the fact that you need to do integrations by yourself.
|
||||
|
||||
### Rosetta stone
|
||||
|
||||
|
||||
#### Concepts
|
||||
|
||||
| Concept | SD termin | Git termin |
|
||||
|---------|----|----------------|
|
||||
| Your local copy | enlistment | cloned repo |
|
||||
| Code changes | changelist | commit |
|
||||
| Way to preserve changes locally | dpk | local branch |
|
||||
|
||||
|
||||
#### Commands
|
||||
|
||||
Before running a git command for the first time, try
|
||||
|
||||
```sh
|
||||
git help <command name>
|
||||
```
|
||||
|
||||
To read about flags and the overall meaning.
|
||||
|
||||
|Scenarios | SD command | Git commmand |
|
||||
|---------|----|----------------|
|
||||
| Get the code at the first place | sd enlist | git clone |
|
||||
| Sync changes | sd sync | git pull |
|
||||
| Add new files | sd add | git add |
|
||||
| Modify existing files | sd edit | git add |
|
||||
| Remove existing files | sd delete | git rm |
|
||||
| Copy/Rename files | sd branch | git mv |
|
||||
| Commit to local | | git commit |
|
||||
| Submit changes | sd submit | git push |
|
||||
| Revert changes | sd revert | git checkout |
|
||||
| Undo submitted changes | sd undo | git revert |
|
||||
| Diff tool | odd | git diff |
|
||||
| Clean enlistment | build nuke | git clean |
|
||||
|
||||
Reference in New Issue
Block a user