Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I accidentally tried to upload a zip folder I made, essentially doubling the media I was trying to push and this happened. I've tried searching on commands how to fix this and can't seem to find one.
I've tried that YouTube video that says git push -A
I've tried git ' lfs track "*.ext" '
And a couple others I can't recall
Thanks!
You can undo your previous commit.
From the linked answer:
$ git commit -m "Something terribly misguided" # (1)
$ git reset HEAD~ # (2)
<< edit files as necessary >> # (3)
$ git add ... # (4)
$ git commit -c ORIG_HEAD # (5)
Related
This question already has answers here:
How to resolve git error: "Updates were rejected because the tip of your current branch is behind"
(12 answers)
Closed 2 years ago.
As I'm a new user to git. Can someone please help me out and explain the error shown in the picture
picture
The branch that you are working on is too far ahead of the remote branch. You need to pull the remote branch, resolve and conflicts and then you'll be able to push.
Git can be confusing!
It means that there are already changes on the remote branch that are not part of the history of your branch... under this circumstances, git is asking you to bring over those changes into your branch.... that is normally done with pull... or with merge... or with rebase. You can see the situation by running git fetch origin and then run something like gitk --all, then you will notice that your branch went in one direction, the remote branch went in a different direction.
This question already has answers here:
Mercurial (hg) commit only certain files
(3 answers)
Closed 9 years ago.
I am new on linux, and i really like it so far. But i have a problem with mercurial.
I have a folder that has 5 subfolder, each of them with a project. So i'm working at a project (a subfolder) and i want to commit modifications only from that folder.
So in linux what i did was:
cd /var/www/project_foder/subfolder
hg status //it brings all the modifications(also from other projects)
hg commit -m "Message"
but it commit all the project modifications.
How can i commit only from the selected folder modifications.
Thanks in advance for your answers!.
PS: sorry for my poor english
You can specify the folder name as argument. You can also make hg status and hg commit apply to the current directory (and sub dirs) only by using a single dot as argument, e.g.:
cd /var/www/project_foder/subfolder
hg status .
hg commit -m "Message" .
I am just getting into using Mercurial and I saw that someone was using the command
hg pull - - update -vvv
what does -vvv mean?
Thanks
Not 100% certain (-vvv isn't a standard switch in Mercurial), but -v on its own makes the output verbose. When performing a verbose pull-with-update (hg pull --update -v), this outputs a tad more information, primarily which files are being updated, etc.
Running your command (using -vvv) has the same effect as -v, so Mercurial is treating it as a verbose switch. The output certainly doesn't come out more verbose.
My guess is that the person in question has a stuck key :)
$ hg pull
Password:
pulling from ssh://foo#bar.com:22//home/usr/xxx/repo
searching for changes
adding changesets
adding manifests
adding file changes
It then keep showing the above for 10+ min. Is there a way to tell the progress and whether it's still live or already dead?
Use the Progress extension by adding the following to your HGRC:
[extensions]
progress =
and/or use the verbose option:
hg pull -v
There is a related question on StackOverflow that may also be useful to you.
As for your followup question: if Mercurial is tracking a file (that is, if you hg add and later hg commit subdir1/subsubdir1/foobar.c) then it wont ignore it. So .hgignore can only help you clean up the entries listed with ? (the unknown files) in hg status — it wont have any effect on tracked files.
The progress extension is your friend. You can also add the -v/--verbose and --debug switches to hg pull see more data.
I saw this thread which discusses a solution for git, and found this thread on the mailing list for Mercurial (the thread is four years old though)
The solution proposed in the mailing list is to use hg rm -Af file (and they leave open the possibility of implementing this behavior as a new, more intuitive option). I'm wondering if that option exists now.
Also, if I try the command above:
> hg rm -Af my_file
> hg st
R my_file
there is an R next to my_file, but the file my_file is technically on disk, and I have told Mercurial to stop tracking it, so why am I getting R next to it?
You can just use hg forget or maybe add the file to your .hgignore file
And to answer the last question about the R in my_file. If you see the help for hg rm --help:
hg remove [OPTION]... FILE...
aliases: rm
remove the specified files on the next commit
Schedule the indicated files for removal from the current branch.
This command schedules the files to be removed at the next commit. To undo
a remove before that, see "hg revert". To undo added files, see "hg
forget".
Returns 0 on success, 1 if any warnings encountered.
options:
-A --after record delete for missing files
-f --force remove (and delete) file even if added or modified
-I --include PATTERN [+] include names matching the given patterns
-X --exclude PATTERN [+] exclude names matching the given patterns
[+] marked option can be specified multiple times
use "hg -v help remove" to show more info
As you can see you are forcing the deletion of that file and that's why you can see the R (Removed)