A coworker deleted some files and committed them. Without paying too much attention, I pulled his changes and committed them. 16 of the files he deleted should not have been and now neither of us has a copy of them.
I figured this was no problem, I will simply reset each of the files to their last commit. As I understand it, the procedure is to go to the commit where the files were deleted, then right-click on each file and select menu item "Log Selected..." which will point me at the desired commit. But when I select one of the files and right-click on it, the "Log Selected..." menu item is dim! It seems to be dim for all of the deleted files, but is OK for the files that were just changed.
I didn't think of doing the "Reverse commit" on the entire commit. There were a bunch other files changed, but it would have been relatively easy to discard those changes before committing the reversal.
As it was, I was trying to just reverse the commit for each of the erroneously deleted files, as was suggested by a post from 2015 on this forum), but was stymied by the "log selected" menu item being dim for the individual deleted files (it was available for the changed files in that commit). I agree that it looks "off" and seems like a bug because reversing the removal of a file is easily reversible!
1. Go to the commit that deleted the files.
2. Right-click on the deleted file and select "Log Selected" menu item.
3. Determine when the file was last committed.
4. Go to that commit
5. Right-click on the deleted file and select "Reset to commit" menu item.
I have a source tree and a diff file containing about 200 changes to different files in the source tree.
In the past I only applied changes to a source tree using patch files, but how do i do this with a diff file?
Do i have to create a patch file out of the diff file? Cause i saw that it seems to be the normal case that you create
patch files using two different source trees and than compare them using diff.
Done!
github.com/sublimehq/sublime_merge Issue: New section under file tab to see and add ignored filesopened by dougcunhaon 2020-07-27Problem descriptionSometimes we need to ignore files based on file extension or folder. When you have a repository with more than...
Although UID/GID and symlinks are preserved by -a (see -lpgo), your question implies you might want a full copy of the filesystem information; and -a doesn't include hard-links, extended attributes, or ACLs (on Linux) or the above nor resource forks (on OS X.) Thus, for a robust copy of a filesystem, you'll need to include those flags:
The default cp will start again, though the -u flag will "copy only when the SOURCE file is newer than the destination file or when the destination file is missing". And the -a (archive) flag will be recursive, not recopy files if you have to restart and preserve permissions. So:
Usually with a large amount of files, there will be some that tar can't handle for whatever reason. Or maybe the process will get interrupted, or if it is a filesystem migration, the you might want to do the initial copy before the actual migration step. At any rate, after the initial copy, I do an rsync step to sync it all up:
If you really need an answer: I'd use rsync because it's much more flexible. Need to shutdown before copying is complete? Just ctrl-c and resume as soon as your back. Need to exclude some files? Just use --exclude-from. Need to change ownership or permissions? rsync will do that for you.
If both storages are local, cp should transfer data near maximum possible speed. It is not necessary to use a synchronizer if the target directory is empty, but it brings benefits like restartability, possibility to exclude certain files etc.
rsync is strong in copying over network (delta transfer of big files). But rsync keeps its internal data in memory, which may cause problems with huge directory trees.
If you are interested in another synchronizer, you might have a look at Fitus/Zaloha.sh. It runs find on both directories and prepares scripts with cp commands. It keeps its internal data in files, not in memory. It is used as follows:
To set up your source control tool to use MATLAB as the application for diff and merge, you must first determine the full paths of the mlDiff, mlMerge, and mlAutoMerge executable files, and then follow the recommended steps for the source control tool you are using.
This command displays the full paths of the mlDiff, mlMerge, and mlAutoMerge executable files. It also automatically populates the global .gitconfig file. For example:[difftool "mlDiff"] cmd = \"C:/Program Files/MATLAB/R2020b/bin/win64/mlDiff.exe\" $LOCAL $REMOTE[mergetool "mlMerge"] cmd = \"C:/Program Files/MATLAB/R2020b/bin/win64/mlMerge.exe\" $BASE $LOCAL $REMOTE $MERGED[merge "mlAutoMerge"] driver = \"C:/Program Files/MATLAB/R2020b/bin/win64/mlAutoMerge.bat\" %O %A %B %A
The usage of the .gitignore file is very popular and well-described elsewhere, so I will not go into details. Just to mention, this method is planned to be applied to files that you want GLOBALY UNTRACKED. File in .gitignore is completely ignored by Git on all systems using that repository.
The skip-worktree option is a less-known Git option. This method is planned to be applied to files that you want TRACKED, LOCAL CHANGES IGNORED. Use case for having files TRACKED, LOCAL CHANGES IGNORED is very strong. Just to mention the web.config file that every developer ASP.NET will have locally modified with at least a database connection string. You want that file TRACKED since that is an important part of your application, but you want changes to your local system to be ignored since your local version will contain your local settings that are different for each developer on the project.
Use case for having files TRACKED, LOCAL CHANGES IGNORED is very strong. Just to mention the web.config file that every developer ASP.NET will have locally modified with at least a database connection string. Usage of .gitignore in this case will not solve the problem. The appropriate method is the usage of skip-worktree option in Git.
I've created a new function, it's all correct, its prototype is in its header file, yet the compiler is telling me that there's an undefined reference to the function I'm trying to call from the Cube generated code.
I just created a new directory in Eclipse, then created new files by right clicking on the new directory and selecting file from template, then wrote my code. Is there a non-obvious step you have to take to somehow add the actual file to the project? You'd expect the IDE just to add it to the project, but then this is Eclipse and anything's possible with Eclipse.
My project has directories that are shared between the two projects for two CPU cores of the MCU, and the shared directories are outside the two project directory structures. Neither drag&drop nor Refresh seem to work there, specifically the the bottom-level directories (drag&drop seems to work for higher-level shared directories, but Refresh doesn't pick up the new .c files).
I followed your solution and it still reports an `undefined reference to function`. In Core, I've created a Cpp folder, added my header file with an extern void declaration, and a source file with the void definition. I've obviously included the header file in the source file, and in the main.c file, but calling the void from the main function still gives an undefined reference function. Using 1.12.1 version.
Core/Inc) or you have to tell the compiler that a specific file should be included. If you want to create a new folder for your header files you have to add the folder or files inside this folder to the include path via:
Please note also that you must have blue C mark on the C source folder, otherwise source files are not found/compiled. You can change your folder include/exclude -property by select folder -> right click -> properties -> C/C++ build -> Exclude resource from build
ls is the standard command to list files in Ubuntu and other Linux and Unix operating systems. ls is particularly useful to learn because you will find it installed on every Unix system you ever meet. By default running this displays only the files in the current directory.
You may also want to use the -type f option to limit the results to just files. If you want to match a file pattern, you want the -name or -iname options (case sensitive, and case insensitive matching, respectively). Take a read through find's man page - there are a substantial amount of options that you can use to narrow/refine your search.
I have created a program specially for this - Directory Snapshot.
It recursively iterates through a directory and stores the names and sizes of all the files and folders it encounters in neatly-structured HTML files, which have an organization similar to that of the input directory.
In other words, this can be thought of as a hyperlinked version of the dir /s or tree /f commands.
I have been using git with sourcetree on windows for a few months now and had some questions that i figured would be better asked here than yahoo answers. I am using git with sourcetree for my project, so my first question is this:
How many branches do you normally have? I currently have 4, Master, Development, Working(for uploading builds in progress) and Release. Should I have more branches? I only have 1 other person helping me, but what if i had like 4 or 5? do they all have their own branches? What if they edit the same files and push to the same branch? whos files get overwritten?
The daemon is the linux version and service contains the windows version. Originally, I made 2 separate cmake projects in those 2 folders and it worked. But I had to copy paste code between both projects. Now I want to move sources with common code into the commons folder. So that each project includes the sources from the common folder instead of copy pasting code.
df19127ead