Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

hg force update to new files

Tags:

mercurial

I am using hg version 1.9.1. Problem is whenever I use hg update, I get an option of updating changed files. Do we have an option for forcefully updating all files to their new versions in the latest commit. Sorry but i did not find any useful information in hg manual.

like image 261
prathmesh.kallurkar Avatar asked Jan 27 '12 18:01

prathmesh.kallurkar


People also ask

What does hg update -- clean do?

Use -C/--clean to reset the working directory branch to that of the parent of the working directory, negating a previous branch change. Use the command hg update to switch to an existing branch.

What hg command shows a list of changed files?

If you are using the terminal in windows add hg status --rev x:y > your-file. txt to save the list to a file. To only see changes in the current directory: hg status --rev x:y .


1 Answers

hg update --clean 

This will update your working directory with the newest version of files in the current branch. Please note that this command will discard all existing changes in your working directory.

If you meant "can I get a fresh copy of each and every file from the repository" just delete all files in your working directory and do a hg update --clean again.

like image 59
Sedat Kapanoglu Avatar answered Sep 22 '22 22:09

Sedat Kapanoglu