FAQ

IndexTagsArchivesAbout
  • When should I use git pull --rebase?

    2023-04-17

    Question I know of some people who use git pull --rebase by default and others who insist never to use it. I believe I understand the difference between merging and rebasing, but I'm trying to put this in the context of git pull. Is it just about not wanting to see lots of merge commit messages, or are there other issues? Answer I would like to provide a different perspective on what git pull --rebase actually means, because it seems to get lost sometimes.…

    #git

  • Difference between map, applymap and apply methods in Pandas

    2023-04-15

    Question Can you tell me when to use these vectorization methods with basic examples? I see that map is a Series method whereas the rest are DataFrame methods. I got confused about apply and applymap methods though. Why do we have two methods for applying a function to a DataFrame? Again, simple examples which illustrate the usage would be great! Answer apply works on a row / column basis of a DataFrame applymap works element-wise on a DataFrame map works element-wise on a Series…

    #python

  • How to add chmod permissions to file in Git?

    2023-04-15

    Question I would git commit a .sh file, but would like it to be executable when I checkout that same file in another server. Is there a way to do so without manually chmod u+x that file in the servers that checkout the file? Answer According to official documentation, you can set or remove the "executable" flag on any tracked file using update-index sub-command. To set the flag, use following command:…

    #git

  • How to cherry-pick only changes to certain files?

    2023-04-15

    Question If I want to merge into a Git branch the changes made only to some of the files changed in a particular commit which includes changes to multiple files, how can this be achieved? Suppose the Git commit called stuff has changes to files A, B, C, and D but I want to merge only stuff's changes to files A and B. It sounds like a job for git cherry-pick but cherry-pick only knows how to merge entire commits, not a subset of the files.…

    #git

  • How to create a .gitignore file

    2023-04-15

    Question I need to add some rules to my .gitignore file. However, I can't find it in my project folder. Isn't it created automatically by Xcode? If not, what command allows me to create one? Answer If you're using Windows, it will not let you create a file without a filename in Windows Explorer. It will give you the error "You must type a file name" if you try to rename a text file as .…

    #git

  • How to undo local changes to a specific file [duplicate]

    2023-04-13

    Question This question already has answers here: </div> Undo working copy modifications of one file in Git (15 answers) Closed 5 years ago. I'm trying to undo local changes to a specific file. Nothing has been committed. When I want to revert all changes, I can perform git revert --reset HEAD. However, in this case, I don't want to revert all changes to all files. Its not clear or obvious to me how to revert just a file, even after reading the git-revert(3) man page:…

    #git

  • .gitignore is ignored by Git

    2023-04-12

    Question My .gitignore file seems to be being ignored by Git - could the .gitignore file be corrupt? Which file format, locale or culture does Git expect? My .gitignore: # This is a comment debug.log nbproject/ Output from git status: # On branch master # Your branch is ahead of 'origin/master' by 1 commit. # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # debug.…

    #git

  • «
  • 26
  • 27
  • 28
  • 29
  • 30
  • »

©2023 hugo-notepadium-mod

CC BY-NC-SA 4.0 | RSS

Powered by Hugo and the Notepadium-mod

^ TOP ^