User Tools

Site Tools


using_git

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
using_git [2020/01/19 17:22]
hlzhs
using_git [2020/02/04 20:42]
mevsme [Set up Git]
Line 32: Line 32:
 to switch to the upstream master branch. to switch to the upstream master branch.
  
 +\\
 +If you get an error that says: 
 +<code bash>
 +error: Your local changes to the following files would be overwritten by checkout:
 +some/​file/​path.h
 +another/​file/​name.cpp
 +Please commit your changes or stash them before you switch branches.
 +Aborting
 +</​code>​
 +
 +You can discard your local changes by
 +''​ git reset --hard''​ or ''​git checkout -t -f remote/​branch''​
 +
 +\\
 +\\
 Configure Git so that you push to your fork by default for new branches: Configure Git so that you push to your fork by default for new branches:
 <​code>​ <​code>​
Line 134: Line 149:
  
  
-If you already opened a PR, you need to [[https://​help.github.com/​en/​github/​collaborating-with-issues-and-pull-requests/​changing-the-base-branch-of-a-pull-request|change ​it'​s ​base branch]]. ​+If you already opened a PR, you need to [[https://​help.github.com/​en/​github/​collaborating-with-issues-and-pull-requests/​changing-the-base-branch-of-a-pull-request|change ​its base branch]]. ​
  
  
using_git.txt ยท Last modified: 2020/03/25 11:30 by be.ing