mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 01:41:22 -06:00
Minor tweaks to git cheat sheet
This commit is contained in:
parent
301ebe0da3
commit
73b85f9b29
@ -246,8 +246,12 @@ To https://github.com/netbox-community/netbox
|
|||||||
Branch 'testing' set up to track remote branch 'testing' from 'origin'.
|
Branch 'testing' set up to track remote branch 'testing' from 'origin'.
|
||||||
```
|
```
|
||||||
|
|
||||||
!!! info
|
!!! tip
|
||||||
If this branch already exists on the remote repository, `git push` is sufficient.
|
You can apply the following git configuration to automatically set the upstream for all new branches. This obviates the need to specify `-u origin`.
|
||||||
|
|
||||||
|
```
|
||||||
|
git config --global push.default current
|
||||||
|
```
|
||||||
|
|
||||||
## The GitHub CLI Client
|
## The GitHub CLI Client
|
||||||
|
|
||||||
@ -308,7 +312,7 @@ $ git commit --amend --no-edit
|
|||||||
```
|
```
|
||||||
|
|
||||||
!!! danger "Don't Amend After Pushing"
|
!!! danger "Don't Amend After Pushing"
|
||||||
Never amend a commit you've already pushed upstream, as doing so will break the commit tree. Create a new commit instead.
|
Never amend a commit you've already pushed upstream unless you're **certain** no one else is working on the same branch. Force-pushing will overwrite the change history, which will break any commits from other contributors. When in doubt, create a new commit instead.
|
||||||
|
|
||||||
### Undo the Last Commit
|
### Undo the Last Commit
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user