kandi background
kandi background
Explore Kits
kandi background
Explore Kits
kandi background
Explore Kits
kandi background
Explore Kits
Explore all Version Control System open source software, libraries, packages, source code, cloud functions and APIs.

Popular New Releases in Version Control System

v3.1.2

2.1.4

Release 1.2.0

v22.04.22.1452

husky

git-lfs

v3.1.2

FastGithub

2.1.4

git-imerge

Release 1.2.0

CSS-Exchange

v22.04.22.1452

Popular Libraries in Version Control System

Trending New libraries in Version Control System

Top Authors in Version Control System

1

5 Libraries

22

2

4 Libraries

26

3

3 Libraries

9

4

3 Libraries

26181

5

3 Libraries

180

6

3 Libraries

23

7

2 Libraries

6

8

2 Libraries

4

9

2 Libraries

167

10

2 Libraries

38

1

5 Libraries

22

2

4 Libraries

26

3

3 Libraries

9

4

3 Libraries

26181

5

3 Libraries

180

6

3 Libraries

23

7

2 Libraries

6

8

2 Libraries

4

9

2 Libraries

167

10

2 Libraries

38

Trending Kits in Version Control System

No Trending Kits are available at this moment for Version Control System

Trending Discussions on Version Control System

    History of all git commands issued from repo's initialization
    composer remove (uninstall) all installed packages (composer install rollback)
    Get package source from sources.list.d
    Unable to access the API key using BuildConfig
    First time Git user, Push to remote repository takes forever
    Should I be adding the Django migration files in the .dockerignore /.gitignore file?
    How can I find all common sub strings using Rust , Python, javascript?
    Error opening the database 'objectbox': In entity "Album", property "artistId": missing virtualTarget
    Can't create a fresh Nuxt project?
    Why does the Version Control System Git stage files first, instead of committing them directly?

QUESTION

History of all git commands issued from repo's initialization

Asked 2022-Mar-27 at 10:31

I have the following use case:

On my local computer, I had the following structure of files/folders outside of any version control system, including git.

1ProjectFolder
2    ---Folder1
3        ----File1.txt
4    ----Folder2
5        ----File2.txt
6        ----100s of other files/folders
7

In preparation for version control, I first ran git init in this folder.

This gave me:

1ProjectFolder
2    ---Folder1
3        ----File1.txt
4    ----Folder2
5        ----File2.txt
6        ----100s of other files/folders
7ProjectFolder
8    ---.git
9    ---Folder1
10        ----File1.txt
11    ----Folder2
12        ----File2.txt
13        ----100s of other files/folders
14

I then went to github and created a repository, say:

https://github.com/Tryer/ProjectFolder.git

After this, from the command line on my machine, I issued:

git remote add origin https://github.com/Tryer/ProjectFolder.git

I did not want to add Folder2 and its contents to the commit. I only wanted Folder1 and its contents to be committed.

I, by mistake, did not created a proper .gitignore file leading to staging of some files from Folder2 when I then issued git add .

I do not now remember exactly whether I issued git rm -f <files from Folder2> or git rm --cached <files from Folder2> to unstage the unneeded files from Folder2. The former would have forced deleted the files from Folder2 from both the staging area as well as my working tree (something I did not intend/want). The latter would have only unstaged the files but left them in my working tree (something that is precisely what I would have wanted.)

The number of files under Folder2 are rather large and a due diligence check on Folder2's contents manually on my machine seems to reveal nothing amiss in terms of missing files from my working tree.

Yet, just to be absolutely sure, is there a way to list all of the git commands ever issued under a repository from the beginning of time? Note that I am not asking for a history of commands I have issued from the terminal command line. This would be available in a powershell history or bash shell history.

A previous question of exactly this issue is available here. However, the question is about 10 years old and the highest voted answer there suggests to use git reflog. However, that seems to give history in terms of commits. I am looking more for the exact git commands that I have executed.

ANSWER

Answered 2022-Mar-27 at 10:31

No, it's not possible with Git. Git does not keep track of the commands executed in a repository.

Your best bet is your shell's command history.

Source https://stackoverflow.com/questions/71635506

Community Discussions contain sources that include Stack Exchange Network

    History of all git commands issued from repo's initialization
    composer remove (uninstall) all installed packages (composer install rollback)
    Get package source from sources.list.d
    Unable to access the API key using BuildConfig
    First time Git user, Push to remote repository takes forever
    Should I be adding the Django migration files in the .dockerignore /.gitignore file?
    How can I find all common sub strings using Rust , Python, javascript?
    Error opening the database 'objectbox': In entity &quot;Album&quot;, property &quot;artistId&quot;: missing virtualTarget
    Can't create a fresh Nuxt project?
    Why does the Version Control System Git stage files first, instead of committing them directly?

QUESTION

History of all git commands issued from repo's initialization

Asked 2022-Mar-27 at 10:31

I have the following use case:

On my local computer, I had the following structure of files/folders outside of any version control system, including git.

1ProjectFolder
2    ---Folder1
3        ----File1.txt
4    ----Folder2
5        ----File2.txt
6        ----100s of other files/folders
7

In preparation for version control, I first ran git init in this folder.

This gave me:

1ProjectFolder
2    ---Folder1
3        ----File1.txt
4    ----Folder2
5        ----File2.txt
6        ----100s of other files/folders
7ProjectFolder
8    ---.git
9    ---Folder1
10        ----File1.txt
11    ----Folder2
12        ----File2.txt
13        ----100s of other files/folders
14

I then went to github and created a repository, say:

https://github.com/Tryer/ProjectFolder.git

After this, from the command line on my machine, I issued:

git remote add origin https://github.com/Tryer/ProjectFolder.git

I did not want to add Folder2 and its contents to the commit. I only wanted Folder1 and its contents to be committed.

I, by mistake, did not created a proper .gitignore file leading to staging of some files from Folder2 when I then issued git add .

I do not now remember exactly whether I issued git rm -f <files from Folder2> or git rm --cached <files from Folder2> to unstage the unneeded files from Folder2. The former would have forced deleted the files from Folder2 from both the staging area as well as my working tree (something I did not intend/want). The latter would have only unstaged the files but left them in my working tree (something that is precisely what I would have wanted.)

The number of files under Folder2 are rather large and a due diligence check on Folder2's contents manually on my machine seems to reveal nothing amiss in terms of missing files from my working tree.

Yet, just to be absolutely sure, is there a way to list all of the git commands ever issued under a repository from the beginning of time? Note that I am not asking for a history of commands I have issued from the terminal command line. This would be available in a powershell history or bash shell history.

A previous question of exactly this issue is available here. However, the question is about 10 years old and the highest voted answer there suggests to use git reflog. However, that seems to give history in terms of commits. I am looking more for the exact git commands that I have executed.

ANSWER

Answered 2022-Mar-27 at 10:31

No, it's not possible with Git. Git does not keep track of the commands executed in a repository.

Your best bet is your shell's command history.

Source https://stackoverflow.com/questions/71635506