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 Both sides next revision
using_git [2020/01/19 17:28]
hlzhs [Targeting another base branch]
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>​
using_git.txt ยท Last modified: 2020/03/25 11:30 by be.ing