git

Remote repo on Google Drive working fine one day, breaks down the next without me touching it

淺唱寂寞╮ 提交于 2021-02-08 07:03:17
问题 So I wanted to make a remote git repository for myself that I can use to work on different machines. Sounds simple, Google drive offers its sync utility for PC and Mac (I use both) so.. I created a remote repo, pretty much following this guide: https://medium.com/@techstreams/git-google-drive-simple-git-host-3a84db4fc1fd It worked fine for the first day - I could commit&push on Macbook, see the changes on PC, commit&push on PC and so on. Need to mention that I use Android Studio mostly and it

git push - Permission to denied - The requested URL returned error: 403

百般思念 提交于 2021-02-08 06:49:57
问题 As many other, when I use git push I get the next error: remote: Permission to mmistakes/minimal-mistakes.git denied to MyName. fatal: unable to access 'https://github.com/mmistakes/minimal-mistakes.git/': The requested URL returned error: 403 I´m working in Windows, I have git 2.22. I tried: Running the following two commands in the terminal, replacing the obvious things: git config --global user.name "Your Name Here" git config --global user.email "Your Email Address Here" This one "How can

Does a rebase the only way to fix a wrong cherry-pick?

♀尐吖头ヾ 提交于 2021-02-08 06:44:26
问题 The branch #1 contains a bug fix C1. The branch #2 first cherry-pick ed C1, then the branch #2 owner realised the work done in C1 was wrong actually, so he committed the correct fix C2. In C2 he basically removed the change in C1, replaced with the correct change. When the branch #1 owner wants to "pick-up" the fix, the merge won't work . Because with merge the result C3 will then contain C1 and the correct fix introduced in C2, i.e. C1 will be keep by merge. Because the branch #2 now does

Chang git account on VScode

浪尽此生 提交于 2021-02-08 06:39:38
问题 I just try to push a repo to github , but I get this dialog PS : 4495b is the old account I can't find a way to change it. I tried git config --global --unset credential.helper Reinstall git and reconfigure it Reinstall VScode Any ideas how to refresh the given account? 回答1: If you confirm that git config credential.helper is not set, check first the remote URL with cd /path/to/repo git remote -v If it is an SSH URL, make sure its associated ~/.ssh/id_rsa ( .pub ) are not the private/public

Exclude certain file patterns from rename detection in git?

独自空忆成欢 提交于 2021-02-08 06:35:59
问题 Question Is it possible to exclude certain file patters from rename detection when doing merges with git? Background With our system, Salesforce.com, some metadata files are exactly identical, except for name. Because of this (I believe) merges can get a bunch of conflicts, e.g. if a meta file was deleted in one branch, and a different meta file with an identical body is deleted in another, it sees things as a rename and conflict with one added on deleted. I know I can tweak the sensitivity

ClearCase MVFS files permissions

北慕城南 提交于 2021-02-08 06:34:25
问题 I am starting to understand the issues I get during my repository synchronization between Git and ClearCase. Let's take a look at this: $ cd $ touch foo && chmod 777 foo $ ls -al foo -rwxrwxrwx+ 1 ch52198 Domain Users 0 Sep 4 15:04 foo $ cd /vob/view/project/ $ cp ~/foo . $ ls -al foo $ -rw-r----- 1 ch52198 Domain Users 0 Sep 4 15:05 foo $ chmod u+x foo $ ls -al foo $ -rw-r----- 1 ch52198 Domain Users 0 Sep 4 15:05 foo ClearCase is doing everything wrong. It ignore all the files permissions

Is it a bad idea to have Git repository in production server

痴心易碎 提交于 2021-02-08 06:29:14
问题 We have a Windows Server 2012, Apache, PHP, and MySQL. The server is a bit a mess. One of the things that I want is to track the changes on the code. Normally I don't set up Git on the server, instead I develop on the local machine then using SSH I deploy changes to the production server. However this Windows Server 2012 was not set up by me and thus it is a bit mess. I cannot copy the PHP code and develop it in my machine because it runs on PHP 5.2 and the code is encrypted. Thus, I think I

git sparse-checkout ignore specific file type

北城余情 提交于 2021-02-08 06:10:11
问题 I have a git repository with a bunch of large csv in them, which I don't want to clone, so I came across git sparse-checkout and this post: https://github.blog/2020-01-17-bring-your-monorepo-down-to-size-with-sparse-checkout/ From this post I took following: git clone --no-checkout https://github.com/john_doe/repo-with-big-csv.git cd repo-with-big-csv git sparse-checkout init --cone Then I edit the .git/info/sparse-checkout and add the following (adapted from example in page above): /* !**/*

Git: local branchs tracks other local branch

戏子无情 提交于 2021-02-08 06:08:56
问题 I know that local branches can track remote branches, but there is also the possibility that a local branch tracks another local branch. What is a use-case for this? 回答1: Real-world use: I have an upstream repository, and a local branch tracking that remote. I start working on a major "feature" which will require a mess of changes to implement, but I don't yet want to expose the work upstream (potentially, ever). So I create a local branch tracking my tracking branch. Now I have origin/master

git sparse-checkout ignore specific file type

淺唱寂寞╮ 提交于 2021-02-08 06:07:58
问题 I have a git repository with a bunch of large csv in them, which I don't want to clone, so I came across git sparse-checkout and this post: https://github.blog/2020-01-17-bring-your-monorepo-down-to-size-with-sparse-checkout/ From this post I took following: git clone --no-checkout https://github.com/john_doe/repo-with-big-csv.git cd repo-with-big-csv git sparse-checkout init --cone Then I edit the .git/info/sparse-checkout and add the following (adapted from example in page above): /* !**/*