-
-
Notifications
You must be signed in to change notification settings - Fork 692
Git usage and troubleshooting
If your git history is really messed up and you don't know how to revert your changes, you can still use the reflog
as a last resort.
-
git reflog
will show you the history of your git actions so that you can find the last good state. -
git reset HEAD@{#}
will send you back to that state.
Click the Fork
button on the top right of GitHub, then run git clone git@github.com:qtile/YOUR-USERNAME/qtile.git
Please read how to write good commit messages. |
---|
Create a branch for your modifications with git checkout -B YOUR-BRANCH
, do your changes, and push them:
git commit -am "Good commit message"
git push origin YOUR-BRANCH
-
git remote add upstream https://github.com/qtile/qtile.git
to add the upstream repository as a remote (you only need to do this once). -
git checkout master
to switch to the master branch. -
git pull upstream master
to get the latest upstream changes. -
git checkout -
to go back to your previous branch (orgit checkout YOUR-BRANCH
). -
git rebase master
to rebase your changes on top of the latest upstream changes.
If you have conflicts that you don't feel comfortable resolving yet, you can still abort the rebase with git rebase --abort
.
If not, you can now push the freshly updated branch with git push --force-with-lease origin YOUR-BRANCH
If you want to group multiple commits into one, follow the same steps as above but run git rebase -i master
instead of git rebase master
.
In the interactive menu, change all but the first commit from pick
to s
or squash
.
- Don't make changes on your
master
branch. Create another branch and usemaster
as a reference point. -
git log --color --graph --abbrev-commit --all
to check commit SHAs.
Home page
Official documentation
Configuration examples:
- Application launchers
- Configuration file
- Floating windows
- Groups
- Keyboard keys
- Layouts
- Lazy functions
- Mouse keys
- Replicate other window managers
- Rices
- Rule matching
- Screens
- Wallpapers
- Widgets
- Windows
- Workspaces
Other documents:
Troubleshooting: